Trivia about python

  1. float('-inf') means the negative infinity and is smaller than any
    given number.

  2. how to get json data from api

import requests
import json

r = requests.get(url)
print(r.status_code) # print the status code of this request
r_list = r.json()  # get the list of the json file from api
posted @ 2024-11-03 15:16  HelenHung  阅读(8)  评论(0)    收藏  举报