0
How could we write multi line codes if python gives output after each line?
3 Answers
+ 2
You can create a ".txt" file. Write the code it. and store it in a ".py" format. Well, and then run the finished code
Also, use a text editor to edit the code (.py)
+ 2
PEP8 Style Guide:
Explicit using \ even inside text:
>>> print( \
... "by using continuation" \
... )
by using continuation
>>>
Implicit using (), {} or []:
output = my_function(
a, b, c)
If you aren't in the immediate interpreter (the only place your question applies) then the other answers (use a file) apply.
You can also use streams but that's probably a special need.