A
A
Andrey Godunko2021-08-25 11:46:38
Python
Andrey Godunko, 2021-08-25 11:46:38

How to put a paragraph in the f-line?

How to put a paragraph in the f-line?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andy_U, 2021-08-25
@Noy-name-boy

If by a paragraph you mean a line break, then something like this. Note that c {c=}"focus" doesn't fire.

if __name__ == '__main__':
    a = 1
    b = 2
    c = 'qu\nqq'
    print(f'{a=}\n{b=}\nc={c}\n{c=}')

The PyCharm console output is below:
"C:\Program Files\Python310\python.exe" C:/PycharmProjects/tst/tst.py
a=1
b=2
c=qu
qq
c='qu\nqq'

Process finished with exit code 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question