>>> sys.version
'3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]'
>>> sys.version_info
sys.version_info(major=3, minor=6, micro=2, releaselevel='final', serial=0)
>>> if sys.version_info > (3,6):
print('yes')
else:
print('no')
yes