Home > other >  Beginners python small white, a great god help to look at, feel out when using has a bug, sometimes
Beginners python small white, a great god help to look at, feel out when using has a bug, sometimes

Time:01-03

D={" FCC ":" North America ", "CE" : "the eu"}

Def (f) :
For I in d:
I=input (" country code: please enter your queries \ n> & gt; & gt;" )
If I in d:
Print (" query results for: "d [I])
F ()
If I not in d:
A=input (" "" I'm sorry, your query the country code is not in the dictionary; \ b
1. Add please enter: "add";
2. The print dictionary content please enter: "all";
3. Return the query please press any key.
4. Please enter exit program: "exit";
& gt; & gt; & gt;" "")
If a=="add" :
X=input (" add the country code letters for: ")
Y=input (" add the country code comments as: ")
D [x]=y
F ()
Elif a=="all" :
Print (" current dictionary all content is as follows: ", d)
F ()
Elif a=="exit" :
Return

f()

CodePudding user response:

Think added: double-click the file to open. Py after adding dictionary written in py files, open the can check next time