Jul 24, 2015

Python Tutorial : Double condition in IF

If you have a double conditions scenario in python, you can use the below code. Make sure you press TAB button after : otherwise you might get "Indent Block" error.

today = "Monday"
if today =="Monday" or today == "Wednesday" :    print ("Swimming classes")

No comments:

Post a Comment

Related Post

Related Posts Plugin for WordPress, Blogger...