gethostname()

Returns the hostname:

>>> import socket
>>> socket.gethostname()
'haspp23'