0
Can we multiply string with zero or negative integer
Well if we do this for example: >>>print("spam" * -1) >>>print(spam" * 0) Output is blank no that means no output displayed
6 Answers
+ 4
HonFu [#GoGetThatBugChamp!] I thought the same
+ 3
Yes, you can Vyoma Patel
And the result is a blank for string, a blank tuple () for a tuple and a blank list [] for a list
Eg:
list = [34,45]
tup = (34,45)
print(list*0)
print(tup*0)
Output:
[]
()
+ 2
Vyoma, what is your question?
It looks more like you're telling us something.
+ 2
But if you tried it, then you already know the answer of your question, don't you? đ€
0
Well Dhanush Adithya I actually wanted to convey that only that whether we use array or any map functions multiplied with 0 will produce nothing as for array an empty array and likewise for other simple print function too
0
Well Dhanush Adithya HonFu [#GoGetThatBugChamp!] Actually I asked question but took example written in description so that if I am wrong someone who reads it corrects my mistake I hope know both of you are clear