import sys def myfun(): print("Python version") print(sys.version) print("Version info.") print(sys.version_info) if __name__=="__main__": myfun()
Python version 3.10.4 (v3.10.4:9d38120e33, Mar 23 2022, 17:29:05) [Clang 13.0.0 (clang-1300.0.29.30)] Version info. sys.version_info(major=3, minor=10, micro=4, releaselevel='final', serial=0)