Zettel#48
2023-03-21
In Python, you can use the = character in an f-string to evaluate and display the value of a variable. This is a concise way to include both the variable name and its value in the output.
=
x = 3 print(f"{x=}")
x = 3