+ 1

Guess the output:

a = "10" print(a*0)

6th Sep 2022, 12:36 PM
filibuster
filibuster - avatar
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.
6th Sep 2022, 1:09 PM
Tyler McKechnie
+ 3
Nothing
6th Sep 2022, 12:44 PM
Š•Š²Š³ŠµŠ½ŠøŠ¹ ŠœŠ¾Š»Š“Š¾Š²Š°Š½Š¾Š²
Š•Š²Š³ŠµŠ½ŠøŠ¹ ŠœŠ¾Š»Š“Š¾Š²Š°Š½Š¾Š² - avatar
+ 3
the code is working, and the output is an empty string.
6th Sep 2022, 2:42 PM
Lothar
Lothar - avatar
+ 2
Why? You can check it in playground...! edit: fancy real answer? :prints "10" zero times
6th Sep 2022, 12:40 PM
Jayakrishna šŸ‡®šŸ‡³
+ 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?"
6th Sep 2022, 1:23 PM
Ipang