Hello guys (or women) I try to do an application but I am blocked : I don't how how to get information from a dictionary into a dictionary
I know how to get it, how to read it but I don't know how to read each verb!
Could you help me if you have any information could help me I will really grateful!!
list = { { "FIELD1": "\"A\"", "FIELD2": "\"B\"", "FIELD3": "\"C\"", "FIELD4": "\"D\"", "FIELD5": "" }, { "FIELD1": "\"Base verbale (to...)\"", "FIELD2": "\"Preterit\"", "FIELD3": "\"Participe passe\"", "FIELD4": "\"Traduction\"", "FIELD5": "" }, { "FIELD1": "\"arise\"", "FIELD2": "\"arose\"", "FIELD3": "\"arisen\"", "FIELD4": "\"survenir\"", "FIELD5": "" }, } and what I have done :
import json from verbes import * file = "verbes.py" my_file = open(file, "r").read() keys = list.keys() print(keys) first_object = list["FIELD1"] print(first_object) Thank you again for your help!
[...]) instead of braces ({...}).listas a variable name, it's the name of a built-in type.list of dicts