import sys print(sys.version_info) # sys.version_info(major=3, minor=7, micro=7, releaselevel='final', serial=0) print(sys.version_info <(2,7)) # False print((1,9999,999) <(2,7)) # True print((2,4,999) <(2,7)) # True print((3,4,999) <(2,7)) # True