+ 1
How to take user input in Python?
4 ответов
+ 6
Just remember that input() always returns a string type. If you want to have a number, you have to convert it somewhere along the way or right away:
x = float(input('That will return a float: '))
y = int(input('And that will return an integer: '))
+ 2
x = input()
+ 2
x = input("whatever")
+ 1
thanks