Preview:
 1. var = 100 # var is a variable.
2.if var < 200:
   3.print "Expression value is less than 200"
   4.if var == 150:
      5.print "Which is 150"
   6.elif var == 100:
      7.print "Which is 100"
   8.elif var == 50:
      9.print "Which is 50"
   10.elif var < 50:
      11.print "Expression value is less than 50"
12.else:
   13.print "Could not find true expression"
 
14.print "Good bye!"
 
When the above code is executed, it produces following result −
Expression value is less than 200
Which is 100
Good bye!
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter