+ 2
String operation
I don't understand it at all
6 Réponses
+ 3
String:
a=str('1'+'1')
print(a)
Output: 11
Integer:
b=int(1+1)
print(b)
output: 2
+ 1
Any particular examples that have been bothering you?
+ 1
Aye. The first one takes 1 as an individual string, think like a character and adds 'em so u get 11.
+ 1
Strings are more like arrays of characters.
+ 1
thanks
+ 1
Repeat lesson, if that doesn't help, repeat earlier lessons.