pip install requests
import requests # Telling Python we want to use this power-up
# The "Waiter's" Address (A free API for current weather)
url = "https://api.open-meteo.com/v1/forecast?latitude=13.08&longitude=80.27¤t_weather=true"
# 1. Send the request
response = requests.get(url)
# 2. Convert the "mess" into a Python Dictionary
data = response.json()
# 3. Dig into the Dictionary to find the temperature
# (Based on the JSON structure the API provides)
current_temp = data["current_weather"]["temperature"]
print(f"The current temperature in Chennai is {current_temp}°C")
정보
- 프로그램
- 주기격주 업데이트
- 발행일2026년 1월 29일 오전 12:06 UTC
- 길이14분
- 시즌5
- 에피소드4
- 등급전체 연령 사용가
