<s>[INST] Printing Python version in output How can I print version number for the current Python installation in the output? 
 [/INST] Try
import sys
print(sys.version)

This prints the full version information string. If you only want the python version number, then Bastien LÃ©onard's solution is the best. You might want to examine the full string and see if you need it or portions of it.
 </s>