print("It is a dictionary")
dt = {
"abase" : "To lower in position, estimation, or the like; degrade." ,
"abbess" : "The lady superior of a nunnery." ,
"abbey" : "The group of buildings which collectively form the dwelling-place of a society of monks or nuns." ,
"abbot" : "The superior of a community of monks." ,
"abdicate" : "To give up (royal power or the like).",
"abdomen" : "In mammals, the visceral cavity between the diaphragm and the pelvic floor;the belly." ,
"abdominal": "Of, pertaining to, or situated on the abdomen." ,
"abduction" : "A carrying away of a person against his will, or illegally." ,
"abed" :"In bed; on a bed.",
"append":"To join something to the end",
"accuracy" : "Exactness.",
"accurate" : "Conforming exactly to truth or to a standard.",
"accursed" : "Doomed to evil, misery, or misfortune.",
"accustom": "To make familiar by use.",
"acerbity" : "Sourness, with bitterness and astringency.",
"acetate" : "A salt of acetic acid.",
"acetic" : "Of, pertaining to, or of the nature of vinegar.",
"ache": "To be in pain or distress.",
"achillean" : "Invulnerable",
"achromatic" : "Colorless",
"acid" : "A sour substance.",
"acidify" : "To change into acid.",
"acknowledge": "To recognize; to admit the genuineness or validity of.",
"acknowledgment":"Recognition.",
"acme" : "The highest point, or summit.",
"acoustic" : "Pertaining to the act or sense of hearing.",
"acquaint" : "To make familiar or conversant.",
"acquiesce" : "To comply; submit.",
"acquiescence" : "Passive consent.",
"acquire" : "To get as one's own.",
"acquisition" :"Anything gained, or made one's own, usually by effort or labor.",
"acquit" : "To free or clear, as from accusation.",
"acquittal" : "A discharge from accusation by judicial action.",
"acquittance": "Release or discharge from indebtedness, obligation, or responsibility.",
"acreage" : "Quantity or extent of land, especially of cultivated land.",
"acrid" :"Harshly pungent or bitter.",
"acrimonious" : "Full of bitterness." ,
"acrimony" : "Sharpness or bitterness of speech or temper." ,
"actionable" :"Affording cause for instituting an action, as trespass, slanderous words.",
"actuality" : "Any reality."
}
X = (input("If you wanna search any word then do\n"))
if X not in dt:
exit("Your word is out of dictionary")
if X in dt:
print(dt[X])
while (True):
X = (input("If you wanna search any word then do\n"))
if X in dt:
print(dt[X])
if X not in dt:
print("Your word is out of dictionary")
break
#Run it anywhere you want copy my code it works fine with me it is made using while loop so feel free to use it
break
afterfooBar = True
– Castledwhile
loop, every for loop can be written as a while loop if you really have to for some reson but I don't see any advantages over your for loop. – Arms.keys()
returns a set-like View, and if the values are of a suitable type then the.items()
View is also set-like. – Atlasbreak
means that there's a linear search somewhere that could be faster if the data was organized better. – Nozzle.viewkeys()
etc. – Atlas