socket.gethostbyname() - socket
Translate a host name to IPv4 address format. The IPv4 address is returned as a
string, such as '100.50.200.5'. If the host name is an IPv4 address itself
it is returned unchanged. See gethostbyname_ex() for a more complete
interface. gethostbyname() does not support IPv6 name resolution, and
getaddrinfo() should be used instead for IPv4/v6 dual stack support.
Syntax
socket.gethostbyname(hostname)
Example
Output / Return Value
Limitations
Alternatives / See Also
Reference