print on the same line | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

print on the same line

i have a code that does this for i in range(3): print("#") the output is this: # # # how can i make this the output: ###

16th Jun 2019, 8:45 AM
Cat Sauce
Cat Sauce - avatar
2 Answers
+ 7
for i in range(3): print("#", end='')
16th Jun 2019, 8:46 AM
Anna
Anna - avatar
- 1
for i in range(0, 3) : print ("#", end=" ")
22nd Jun 2019, 7:32 AM
Muskan Singh
Muskan Singh - avatar