Basically, I have some variables and I want to quickly iterate through it.
I see three possibilities:
- Using a list
- Using a tuple
- Using an implicit tuple
Respectively for example:
for regex in [regex_mail, regex_name]:
...
for regex in (regex_mail, regex_name):
...
for regex in regex_mail, regex_name:
...
Is there any reference indicating the syntax I should to use?
I looked at PEP8 but nothing is said about it.
I know this question may look as "primarily opinion based", but I am looking for concrete arguments that might allow me to choose the most adapted style (and PEP20 states that "There should be preferably only one way to do it").