import socket #!/usr/bin/env python3 def get_ip_address(): hostname = socket.gethostname() ip_address = socket.gethostbyname(hostname) return ip_address if __name__ == "__main__": print("IP Address:", get_ip_address())