Python 3: Print Version String from Script

By Xah Lee. Date:

Print version number from within the script.

#-*- coding: utf-8 -*-
# python 3

import sys
print(sys.version)

# 3.2.3 (default, Oct 19 2012, 20:13:42) [GCC 4.6.3]

If you have a question, put $5 at patreon and message me.