how to list out all the number in front like "1960065840" for all the list. Thank you!
CodePudding user response:
Pass the json string to a dict variable and then cast it into a list.
data = json.loads(json_string)
first_number_list = [data]
This will take all the keys of the dict generated by the json loads method and put them into a list.
CodePudding user response:
I'm not sure what you are trying to do but...
You have to use dictionary_name_here.keys()
to get the names of the keys.
Example:
dict = {"key":"value"}
print(dict.keys())
Output:
key