0

How do i multiply a string in python ,hmm like (hi) by like any number ?

Sorry mates im new

28th Sep 2021, 2:43 AM
Mario
8 Respuestas
+ 3
print("hi" * 4) Output: hihihihi
28th Sep 2021, 2:59 AM
Chloe
Chloe - avatar
+ 2
😭 thank you mates
28th Sep 2021, 3:01 AM
Mario
+ 1
Ok so how do i multiply hi by like 20 or something , thank u mates
28th Sep 2021, 2:47 AM
Mario
+ 1
Mario print ("hi" * 20)
29th Sep 2021, 4:05 AM
Triz
Triz - avatar
+ 1
Thanks triz😬
29th Sep 2021, 4:07 AM
Mario
0
Oh yeah thanks , but what about like i want to multiply hi by 20 so the output is hihhihi 20 times u know
28th Sep 2021, 2:55 AM
Mario
0
So u can multiply “hi” (hi is a word that known as a ‘string’ ) by any integer from 1 onwards
29th Sep 2021, 4:08 AM
Triz
Triz - avatar
0
Happy days
29th Sep 2021, 4:09 AM
Mario