New course! Every coder should learn Generative AI!
Try a free lesson0
What is the result of this code? >>> x = "a" >>> x *= 3 print(x)
1 Answer
+ 1
Here a will print 3 times
x = "a"
x *= 3
x = "a" * 3
= aaa
when we multiply any string with number n that string will print n times.