1print('*', end='')
2print('*', end='')
3print('*', end='')
4
5# output:
6# ***
1# A small example using range function
2for i in range(1, 11):
3 print(i, end="")
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))
1# Python 2 only
2print "Seven"
3# Backwards compatible (also fastest)
4import sys
5sys.stdout.write("Nice film")
6# Python 3 only
7print("Mob Psycho 100", end="")
1from __future__ import print_function
2
3print("\r Running... xxx", end="") # works across both major versions
4