python

[Python] F-strings format syntax call functions

>>> name = "Eric Idle"
>>> f"{to_lowercase(name)} is funny."
'eric idle is funny.'

>>> f"{name.lower()} is funny."
'eric idle is funny.'
Was this helpful?