0

Does input() enters a string?

when I entered a number and tried to print it's sum with other number error was displayed that str can't be concatenated with int.

18th Apr 2019, 5:37 PM
Shubham Singh
Shubham Singh - avatar
1 Answer
+ 3
Yes. Try i = int(input()) to turn the input into a number (or float(input()))
18th Apr 2019, 5:43 PM
Anna
Anna - avatar