>>> print("value1 {} value2 '{}!'".format('aaa', 'bbb'))
value1 aaa value2 'bbb!'
>>> print('value1 {0} value2 {1}'.format('aaa', 'bbb'))
value1 aaa value2 bbb
>>> print('value1 {1} value2 {0}'.format('aaa', 'bbb'))
value1 bbb value2 aaa
>>>
# using format() method and refering
# a position of the object
print('value1 {0} value2 {1}'.format('aaa', 'bbb'))
print('value1 {1} value2 {0}'.format('aaa', 'bbb'))
# the above formatting can also be done by using f-Strings(python 3.6 or above).
>>> print(f"value1 {'aaa'} value2 '{'bbb'}!'")
value1 aaa value2 'bbb!'
>>> a = 11
>>> b = 22
>>> print(f"value1 {a} value2 '{b}!'")
value1 11 value2 '22!'