+ 1
Can you repeat strings directly by multiplying them in python?
Would be awesome with an explanation 👍
4 ответов
+ 3
print("str"*3)
this will just print strstrstr 3 times
its just a syntactic sugar nothing much dont overthink about it 👍🏻
keep on learning u will get used to
+ 2
Prashanth Kumar
What a great explanation, you didn't give me just an explanation but also a brilliant personal opinion, it seriously deserves some great attention to it
0
Yes..print("string"*3)
0
You can go to playground, create a new Python script and check out what happens when you multiple a string.