Traditional Culture Encyclopedia - Weather forecast - There is always an error in the code written in python to get the weather forecast. Solve it.

There is always an error in the code written in python to get the weather forecast. Solve it.

Weatherinfo=r.json() # Put parentheses after json to return the result. Otherwise, only the function address can be returned.

The following python3 passes:

Import? ask

API URL = "/adat/city info/ 10 10 10 100 . html "

r=requests.get(ApiUrl)

weatherinfo=r.json()

Print? (weather info[" weather info "][" ptime "])

Print? (weather info[" weather info "][" temp 2 "])& gt; & gt& gt Eight o'clock

& gt& gt& gt5℃