Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (12.7k points)

What do I have to take a gander at to see whether I'm on Windows or Unix, and so on?

1 Answer

0 votes
by (26.4k points)

Check the below code for reference:

>>> import os

>>> os.name

'posix'

>>> import platform

>>> platform.system()

'Linux'

>>> platform.release()

'2.6.22-15-generic'

The output of platform.system() is as follows:

  • Linux: Linux
  • Mac: Darwin
  • Windows: Windows

Interested to learn python in detail? Come and Join the python course.

Related questions

0 votes
1 answer
asked Jul 26, 2019 in Python by selena (1.6k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...