Embedding Arbitrary Expressions in f-Strings
Because Python f-Strings are evaluated at runtime, you can put any valid expression into them. You’ll learn how to use them to do pretty nifty things such as evaluating expressions, calling functions and even calling methods from them.
Comments & Discussion
Become a Member to join the conversation.