[Tutor] if inside if help python

Senthil Kumaran orsenthil at gmail.com
Mon Mar 9 13:26:36 CET 2009


> I have question  if we make if statement inside if  like cprogramming below how to do  in python

Indentation is the key here. It is very simple.

x=1
y=2

if x == 1:
   print "inside first if"
   if x == 2:
      print "inside second if"

--
Senthil


More information about the Tutor mailing list