[python] How to use boolean 'and' in Python