0

How do you input other data types like integers?

10th Jul 2016, 7:49 AM
Mukund Dhar
Mukund Dhar - avatar
2 Réponses
+ 1
for string input_user = input("enter string")
12th Jul 2016, 8:15 AM
Sumit Choudhary
Sumit Choudhary - avatar
0
The value of input is always returned as a string. Just change it's format before using in computations e.g. x = input('new value: ') z = 3 + int(x)
28th Feb 2017, 9:50 PM
Błażej Masłek
Błażej Masłek - avatar