Message from Python discussions

November 2018

— Hello!

— 

If I have:

if this and that:
elif that and not this


Do I need to use and not this? like if this fails but that doesn't fail do I still need to check for that?

— Sorry for my bad question

— No. if this :
elif that
is enough

— Okay

— So

if this and that:
elif that:

— Yes

— Since if that is false, this doesn't matter.

— And if this is false second gets executed

— And if both are true first one gets executed

— So it is okay without not this.

— Hi all myself Dr. Surendra from Bangalore. Having good hands on in Python. Working on lot python related projects

Message permanent page