I am making a python program which would act as windows cmd, but I need a code which will display Windows's version. [Highlighted one]
How to make it?
I am making a python program which would act as windows cmd, but I need a code which will display Windows's version. [Highlighted one]
How to make it?
import sys
ver = sys.getwindowsversion()
print("{}.{}.{}".format(ver.major, ver.minor, ver.build))
Output :
10.0.18362
import platform
platform.version()
My output was '10.0.17134'
Windows-10-10.0.10586-SP0, not 10.0.10586!You can try this:
import os
os.system('ver')
Microsoft Windows [Version 10.0.10586]. But nice work!