Welcome aboard! We are happy you are here and wish you good net-raft!
import requests
city = requests.get('http://ipinfo.io')
data = json.loads(city.text)
print (data['city'])
// import json is needed yet
import requests
import json
city = requests.get('http://ipinfo.io')
data = json.loads(city.text)
print (data['city'])
The most helpful PYTHON solutions
how to get client ip address using python ?PYTHON Click to see more ... 336 38