So in my program i need to know if the program is running in, say, Windows 7 or 10. is there any method or module that can do that?
Asked
Active
Viewed 59 times
-1
-
1Use `platform` module. `platform.release()` is what you want. – Austin Mar 06 '19 at 04:33
1 Answers
1
import platform
print("Platform :- "+platform.platform())
print("OS:- "+platform.system())
print("Version:- "+platform.version())
print("release:- "+platform.release())

vikas kumar
- 44
- 2