how to get parentheses around datetime in python f string code example
Example 1: python fstring
#python3.6 is required
age = 12
name = "Simon"
print(f"Hi! My name is {name} and I am {age} years old")
Example 2: format specificer f strings python
#!/usr/bin/env python3
val = 12.3
print(f'{val:.2f}')
print(f'{val:.5f}')
Example 3: python f-string padding
#!/usr/bin/env python3
name = 'Peter'
age = 23
print('%s is %d years old' % (name, age))
print('{} is {} years old'.format(name, age))
print(f'{name} is {age} years old')