0
Want to print numbers from 1 to 10 using for loop in python, without any spaces and new line.
How do I do that?
2 Answers
+ 1
The print function has a end parameter which by default is "\n" so simply change it to ""...
for i in range(1, 11):
print(i, end="")
0
Thanks, both the codes are doing the same job!
TurtleShell and Ara