how to use and boolean in python