My host is 10.13.17.18 but my host name is getting some other value
import socket
print(socket.gethostname())
print(socket.gethostbyname(socket.gethostname()))
Is there any solution in python to get hostname
My host is 10.13.17.18 but my host name is getting some other value
import socket
print(socket.gethostname())
print(socket.gethostbyname(socket.gethostname()))
Is there any solution in python to get hostname