How do you multiply a string by an integer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you multiply a string by an integer

4th Jul 2017, 2:53 AM
Ryan Flynn
Ryan Flynn - avatar
2 Answers
+ 4
By multiplying the string by the integer... a = "myString" b = 5 #my int c = a*b * is the symbol used to multiply, if that's what you were really wondering.
4th Jul 2017, 3:04 AM
Rrestoring faith
Rrestoring faith - avatar
+ 4
the correct answer is by using the asterisk operator (*)
4th Jul 2017, 3:23 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar