How to have multiple conditions for one if statement in python [duplicate]
This question already has an answer here: Can you make multiple “if” conditions in Python? [duplicate] 6 answers So I am writing some code in python 3.1.5 that requires there be more than one condition for something to happen. Example: def example(arg1, arg2, arg3): if arg1 == 1: if arg2 == 2: if arg3 == 3: print("Example Text") The problem is that when I do this it doesn't print anything if arg2 and arg3 are equal to anything but 0. Help? SSung2710 I would use def example(arg1, arg2, arg3): if arg1 == 1 and arg2 == 2 and arg3 == 3: print("Example Text") The and operator is identical to the