PEP8 recommends using `if seq:` instead of more verbose alternatives like `if len(seq):`.
The reason you should use “if x” is the same reason you should use “if x not in y” rather than “if not x in y”. It better expresses the semantics of your operation with the side effect that it may be faster.