When we multiply a string by 0 (zero) python why it gives No Output? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

When we multiply a string by 0 (zero) python why it gives No Output?

5th Oct 2019, 9:44 PM
Prashant Gill
Prashant Gill - avatar
1 Answer
+ 1
It doesn't give No Output, it prints an empty string. To try that: print("this is a string"*0=="") OUTPUT: True
5th Oct 2019, 9:58 PM
Aymane Boukrouh
Aymane Boukrouh - avatar