r/Python • u/sasson10 • Apr 29 '26
Discussion Which indentation style do you all prefer for expanding brackets?
I just got curious as to what the more popular style of indentation is when expanding brackets into multiple lines.
This applies to everything, but I'll use a list as an example, the base list will be l = [item1, item2, item3]
- Going down a line and 1 indent level forward from the very first time item
=
- Keeping the first item on the definition line, then adding spaces so everything lines up
=
These are the main 2 I've seen in my time, if you have any others I'd be interested to see them as well