What do you want to save?
Add Code snippet
New code examples
-
Python 2021-08-31 11:25:03
python socket get client ip address
## importing socket module import socket ## getting the hostname by socket.gethostname() method hostname = socket.gethostname() ## getting the IP address using socket.gethostbyname() method ip_address = socket.gethostbyname(hostname) ## printing the hostn... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5