Comment on Python string literals are kinda funnyparentComments−kstrauser1moIn Python, that less hazardous string concatenation operator is an f-string.−layer81moI’m assuming you can only use it with string literals, hence it is less universally useful.−TZubiri1moNope, you can put expressions in them:f'{a} = {functionThatReturnsAButHasSideEffects()}'
Comments
In Python, that less hazardous string concatenation operator is an f-string.
I’m assuming you can only use it with string literals, hence it is less universally useful.
Nope, you can put expressions in them:
f'{a} = {functionThatReturnsAButHasSideEffects()}'