we import the module for handling apis
import requestsparse the url to get the response from
response = requests.get(url='http://api.open-notify.org/iss-now.json')raising an error in case we dont get the desired response code
response.raise_for_status()parse the response in json format
data = response.json()get specific data from the json using keys
longitude = data['iss_position']['longitude']latitude = data['iss_position']['latitude']
iss_position = (longitude, latitude)print(iss_position)