Answers for "how to check what operating system python"

2

python check operating system

from sys import platform
if platform == "linux" or platform == "linux2":
    # linux
elif platform == "darwin":
    # OS X
elif platform == "win32":
    # Windows...
Posted by: Guest on August-25-2021
0

detect operating system using python

import platform
my_os = platform.system()
print("OS in my system : ",my_os)

# Output - 
# OS in my system :  Linux
Posted by: Guest on December-28-2021

Code answers related to "how to check what operating system python"

Python Answers by Framework

Browse Popular Code Answers by Language