Search code examples
pythonlogical-and

What is Python's equivalent of && (logical-and) in an if-statement?


This doesn't work:

if cond1 && cond2:

Solution

  • Use and instead of &&.