Skip to content
How do you display version of python in repl?
Profile icon
kurtk2000

How do you display version of python in repl?

You are viewing a single comment. View All
Profile icon
CodeLongAndPros

You can do this:

import sys print(sys.version)

Or, for 2/3:

try: print "Python2" except: print("Python3")