if I have a simple for loop like:
for i in range(10):
total = 0
total = total + i
print(total)
How can I print the loops once/together like:
1 2 3 4 5 6 7 8 9
Instead of every loop by itself:
1
2
3 etc
if I have a simple for loop like:
for i in range(10):
total = 0
total = total + i
print(total)
How can I print the loops once/together like:
1 2 3 4 5 6 7 8 9
Instead of every loop by itself:
1
2
3 etc