ID EN
Sys

platform

Python 3.11 🇮🇩 Bahasa Indonesia

Sebuah string yang berisi pengidentifikasi platform. Nilai yang diketahui adalah:

Syntax

PYTHON
sys.platform

Contoh

Example 1
PYTHON
if sys.platform.startswith('freebsd'):
     FreeBSD-specific code here...
elif sys.platform.startswith('linux'):
     Linux-specific code here...
elif sys.platform.startswith('aix'):
     AIX-specific code here...

See Also

sys.path sys.platform sys.platform os.name os.uname() platform