+ 2
Why there is no error produced when a string is multiplied by zero?
2 Answers
+ 15
balaganesh In python, when you multiple any string with any int value, then it multiples the string that many times
Like,
"Hello" * 3
This will return "HelloHelloHello"
Similarly, if you multiply any string by 0, it will return an empty string.
+ 2