1# to print sum of 1 to 100 numbers in a line (1 + 2 + 3 + 4 +-----+ 100 = 5050)
2for count in range(1, 101):
3 total = total + count
4 if count != 100:
5 print("{0} + ".format(count), end ="")
6 else:
7 print("100 = {0}".format(total))
1from __future__ import print_function
2
3print("\r Running... xxx", end="") # works across both major versions
4