When reviewing tutorials of "Python", it's highly likely Python 3. There are differences between Python2 and Python3 but these vary dependent on level.
A quick identifier is use of print. print("Hello") is Python3 while print "Hello" is Python2.
To do a if else in Python3 is same in Python2.
if a < b:
....
else:
....