IP Finder Using Python


IP Finder Using Python

  • There are many ways to find the ip address in all languages and so in python and this is one of them.
  • Try to code this in your system to learn 

Source Code:

#Follow @Programmerfect

#importing socket module

import socket
hostname = socket.gethostname()
ip_address = socket.gethostbyname(hostname)
print(f"Hostname: {hostname}")
print(f"IP Address: {ip_address}")

Post a Comment

Post a Comment (0)