Feb-23-2018, 06:39 PM
input()
always returns a str. It doesn't matter what you type, it's a str.>>> x = input("?") ?43 >>> x '43' >>> type(x) <class 'str'>If you want a number, then you'll need to convert it to one first:
>>> x = int(input("?")) ?42 >>> x 42 >>> type(x) <class 'int'>