Format String Literals
link: formatted-string-literals
Basic Usage
name = 'UM'
print(f'how are you? {name}')
# convention {literal!r}
# convention ::= "s" | "r" | "a"
# s=str; r=repr; a=ascii
# format {literal:format_spec}
link: formatted-string-literals
Basic Usage
name = 'UM'
print(f'how are you? {name}')
# convention {literal!r}
# convention ::= "s" | "r" | "a"
# s=str; r=repr; a=ascii
# format {literal:format_spec}