Discussion on: Python pro tips

paddy3118 profile image

You mention "Use shorter if statements". I get the sentiment but use a set literal rather than the list as it is better for such lookups, in general.

epogrebnyak profile image
Evgeny Pogrebnyak

There is a view, often debated though, that the more if's you have is code, the less is the quality (eg flags in fucntions, avoidable branching, etc)

Some comments have been hidden by the post's author - find out more