how to get pc name with python

Solutions on MaxInterview for how to get pc name with python by the best coders in the world

showing results for - "how to get pc name with python"
Damián
16 Oct 2020
1# credit to the Stack Overflow user in the source link
2
3import platform
4platform.node()
5>>>'DARK-TOWER'
6
7# or equivalently
8
9import socket
10socket.gethostname()
11>>> 'DARK-TOWER''