Python os.name example

Python os.name example

import os # 👉️ Import module

n = os.name # 👉️ Get Name of the operating system

print(n)

Output:

posix

Python os.name Linux example

import os # 👉️ Import module

n = os.name # 👉️ Get Name of the operating system Using Linux

print(n)

Output:

posix

Python os.name Windows example

import os # 👉️ Import module

n = os.name # 👉️ Get Name of the operating system Using Windows

print(n)

Output:

nt