Formatted strings in Python 3.6 By: Phil Robare
Date: March 8, 2018, 6 p.m.
3.6 has introduced a fourth way to format output from a Python program. PEP 498 introduced a new kind of string literals: f-strings, or formatted string literals. Formatted string literals are prefixed with 'f' and are similar to the format strings accepted by str.format(). They contain replacement fields surrounded by curly braces. The replacement fields are expressions, which are evaluated at run time, and then formatted using the format() protocol This talk will give a quick overview of syntax, usage, and possibly abuse of this new feature.
0 talk