Answer the question
In order to leave comments, you need to log in
How to get a Python 3 dict?
Good evening. I am writing a parser and when writing data to Excel it gives an error TypeError: string indices must be integers I figured out that when I assign a dictionary (dict) to a variable, this variable becomes str. Why is this happening?
import requests
response = requests.get("https://jcmellrudo.top/LiveFeed/GetChampZip?lng=ru&champ=1252965&partner=8&tf=10000")
fight_all = response.json()
rez = fight_all["Value"]["G"][1]["SC"]["S"][1]["Value"]
rez2 = rez["DI"]
print(rez2)
print(type(rez))
print(type(fight_all))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question