Python's f-strings have many cool features this one among them is one i use frequently lately:
a = 5
b = 7
print(f"{a + b = }")
#Output: a + b = 12
Basically it prints expression (any expression!), = and result of evaluating that expression, which is very useful for quick debugging.
Neat, isn't it?
Python's f-strings have many cool features this one among them is one i use frequently lately:
Basically it prints expression (any expression!),
=
and result of evaluating that expression, which is very useful for quick debugging. Neat, isn't it?