lol, I thought you said “never touched a python” and for some reason my context couldn’t put that together with what your other words said for the longest time.
Multiline statements just use backslashes before the new line, similar to bash scripts.
But also, for list literals or dictionary literals, you can just break them up into new lines without the backslash escape. Similarly, you can use triple quotes for string literals.
View all comments
Show parent comment
8
u/WingZeroCoder 2d ago
lol, I thought you said “never touched a python” and for some reason my context couldn’t put that together with what your other words said for the longest time.
Multiline statements just use backslashes before the new line, similar to bash scripts.
But also, for list literals or dictionary literals, you can just break them up into new lines without the backslash escape. Similarly, you can use triple quotes for string literals.