On 7/7/17, Steve D'Aprano <steve+python at pearwood.info> wrote: > import sys > if sys.version_info >= (3,): # the comma is important > print("version 3") But be careful inside script! It could live long enough to see python4 :)