a = 5
# 2 object
print("a =", a)
b = a
# 3 object
print('a =', a, '= b')
Run the program, the result is:
Học Python rất thú vị.
a = 5
a = 5 = b
In the three statements in the above example, only the object parameter is used in the statements.
Example 2: print () with separator and end parameters
a = 5
print("a =", a, sep='00000', end='nnn')
print("a =", a, sep='0', end='')
Run the program, the result is:
a =000005
a =05
See also: Built-in Python functions