First digit of number in python

Python program to get input num and display the first digit of number num

Sample Input 1:


Sample Output 1:


Program or Solution


Program Explanation

Given number is continuously divided by 10, till it becomes lesser than 10 and greater than 0. and the final answer is first digit of given number.

Tech Events