I have a list in Python which includes up to 50 elements. In order for me to easily add/subtract elements, I'd prefer to either code it vertically (each list element on one Python code line) or alternatively, import a separate CSV file?
list_of_elements = ['AA','BB','CC','DD','EE','FF', 'GG']
for i in list_of_elements:
more code...
I'd prefer code like this:
list_of_elements =
['AA',
'BB',
'CC',
'DD',
'EE',
'FF',
'GG']
for i in list_of_elements:
more code...
Just to clarify, it's not about printing, but about coding. I need to have a better visual overview of all the list elements inside the Python code.
for
loop, on the other hand... – Dillard=
... Or put the left bracket next to=
. – Supposed