0
Spam=“eggs” print(spam*3)
The output is eggseggseggs My question is why the ouput is not ‘eggseggseggs’ What is the tpye of output Thanks a lot
1 Odpowiedź
+ 4
The quotes are just the markers for the string literal.
You're basically telling Python: 'I am not writing code here - this is supposed to be a string!'
Consequently, the string is only what's in between - and that's what you display with print.