Sep-16-2019, 06:20 AM
(Sep-16-2019, 06:09 AM)buran Wrote: just to mention that if there is need for escaping within placeholder than it's a case of having expression IN the placeholder. In this case it would be better and more readable to have the expression prepared and assigned to a variable beforehand and use that variable in the f-string
To showcase buran's suggestion:
>>> newline = '\n' >>> first = 'first' >>> second = 'second' >>> print(f'{first}{newline}{second}') first second
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.