By default, the input() function accepts any input type from the user. However, it converts all the input into a string datatype. If you want to display a number, you can use the int() or float() functions to convert the string data.
>>>number = input ('Input a number: ')
Input a number:Â Â
92
>>> number
'92'
>>> int(45)
92
>>> float(45)
92.0
Leave a Reply