Hey my fellow colleagues, how do I multiply string by numbers | Sololearn: Learn to code for FREE!

-2

Hey my fellow colleagues, how do I multiply string by numbers

Multiply string with numbers

5/24/2022 11:42:56 AM

Cool Ice

9 Answers

New Answer

+4

🙁🤔 On which language? What is your try?

+2

Python

+2

"abc" * 2 It's simple

+2

In python, By multiplying a string by an integer, produces a repeated version of the original string. Like this:- print("hello" * 5) Output:- hellohellohellohellohello

+1

Tag the relevant programming language. Re-read the lessons about strings.

+1

What have you tried? Just try to multiply the string with an integer and see what happens

+1

You can multiply a string with an integer.. To see result, print the result. You have answer in question..!!!

+1

It's simple in python.

+1

Thanks you buddy's Let me fix it n see the result