+2 votes
2 views
in Python by (10.2k points)
How to check which Python version is interpreting my script?

3 Answers

0 votes
by (46.1k points)
edited by

Either use sys.hexversion or python- V:

>>> import sys
>>> sys.hexversion
221723736
>>> '%x' % sys.hexversion
'38908f2'
>>> sys.hexversion < 0X07236000
True


Or


 python -V

0 votes
by (107k points)

From the command line you can use the below command:-

python -V

You can use the following video tutorials to clear all your doubts:-

0 votes
by (20.3k points)

Try using this:

>>> import sys

>>> sys.hexversion

33883376

>>> '%x' % sys.hexversion

'20504f0'

>>> sys.hexversion < 0x02060000

True

For more information, you can refer to this: http://docs.python.org/library/sys.html#sys.hexversion

Related questions

0 votes
2 answers
asked May 30, 2019 in Python by Anvi (10.2k points)
+1 vote
1 answer
+1 vote
4 answers
+1 vote
2 answers
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...