帮助将 response_json[0]['price_usd'] 转换为整数
import requests
TICKER_API_URL = 'https://api.coinmarketcap.com/v1/ticker/bitcoin'
response = requests.get(TICKER_API_URL)
response_json = response.json()
print(response_json[0]['price_usd'])
提前致谢。
帮助将 response_json[0]['price_usd'] 转换为整数
import requests
TICKER_API_URL = 'https://api.coinmarketcap.com/v1/ticker/bitcoin'
response = requests.get(TICKER_API_URL)
response_json = response.json()
print(response_json[0]['price_usd'])
提前致谢。
2 个回答