Skip to content

Commit cebfd19

Browse files
sarthakroy2002techyminati
authored andcommitted
Python: Add Print IP Address script
1 parent c569ef3 commit cebfd19

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎Print-IP-Address.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Sarthak Roy (sarthakroy2002)
2+
3+
import socket
4+
hostname = socket.gethostname()
5+
IPAddr=socket.gethostbyname(hostname)
6+
print("My IP Address is:"+IPAddr)

0 commit comments

Comments
 (0)