platform
Stdlib — OS/FilePython 2.0+Intermediate
Retrieve platform info (OS name, version, architecture)
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
- Dependencies
- None — Python Standard Library
- Install
Included with Python
Learn by Difficulty
Quick Example
python
import platform print(f"Module: platform") print(f"Contents: {dir(platform)[:10]}")
The platform module is part of Python's standard library. Retrieve platform info (OS name, version, architecture).
Try in PlaygroundTags
stdlibfile-iosystem