+ 1
Guess the output:
a = "10" print(a*0)
6 Answers
+ 2
This is a good example of why it's important to keep in mind how multiplying across types works, so you don't get any unexpected outcomes.
+ 3
Nothing
+ 3
the code is working, and the output is an empty string.
+ 2
Why?
You can check it in playground...!
edit:
fancy real answer? :prints "10" zero times
+ 2
Consider yourself lucky Python was in a good mood today. You try to fool it into replicating a string zero times
Python - "might as well not to replicate at all, what a fool you took me for hooman?"