+ 1

What If a user input integer value in input function

I mean what if we need an integer input

15th Apr 2018, 3:39 PM
Prem
Prem - avatar
1 Answer
+ 2
In Python, if you want to convert user input to an int then all you would need to do is surround the input() function around the int() function, which converts whatever the user enters into an int. x = int(input())
15th Apr 2018, 3:44 PM
Faisal
Faisal - avatar