Strings | Sololearn: Learn to code for FREE!

0

Strings

print('Hello'*5) this is my program, it's giving the output as HelloHelloHelloHelloHello but what should i do to print the same with spaces between each Hello.

8/25/2019 6:05:53 AM

DINESH REDDY

3 Answers

New Answer

+5

Just add space after Hello print('hello '*5) You can learn more on how the print function works by reading this https://code.sololearn.com/c76OnygcB39j/?ref=app

+4

Try print('Hello '*5)

0

print('hello '*5) or print('hello\t'*5) -> this will create 8 spaces And if you want to print hello on every next line so do this print('hello\n'*5)