Categories
Python

f”string”

f’string’ is a powerful tool for template. It is directly integrated on the syntax. It is very easy to use.
Here is some example for ‘format’ string and f’string’:

# format
a = 10
print('{}'.format(a))

# %
print('%d' % a)

# f'str'
print(f'{a}')