how to get all ips from a host name python code example
Example: get ip python
import socket
host = socket.getfqdn()
addr = socket.gethostbyname(host)
print(f"Your ip is {addr}")
# On Linux, it may give you the localhost address
import socket
host = socket.getfqdn()
addr = socket.gethostbyname(host)
print(f"Your ip is {addr}")
# On Linux, it may give you the localhost address