0

What is "int" and "str" ?

23rd Dec 2016, 2:15 AM
Shukry Rahim
Shukry Rahim - avatar
3 Answers
+ 3
Int is and integer, they are treated like numbers in Python. Str is a string, they are treated as words. This in quotes are treated as words even if they are numbers. So print("1+2") will output 1+2. While print(1+2) will output 3 because they are integers. They are used cause sometimes you do want to convert strings to integers or vis versa. I'm new to Python too so that's about the extent of my knowledge.
23rd Dec 2016, 2:25 AM
Nate Plate
Nate Plate - avatar
+ 2
Two series of three letters, only one letter in twice :P
23rd Dec 2016, 2:18 AM
visph
visph - avatar
0
thanks
23rd Dec 2016, 2:29 AM
Shukry Rahim
Shukry Rahim - avatar