Skip to main content

Posts

Showing posts with the label Dictionary in Python with example codes

- Dictionary in python-

 Dictionary A dictionary is a collection in which each element is a key-value pair.  ex:  myGameDict = { “chess ”: “An indoor game for two players played on a checkerboard”, “cricket”: ”A game played on a large field with bats, ball, and wickets”, “football”: ”An outdoor game in which the ball is advanced bypassing“ }  Elements are enclosed with { }.  Each : pair is separated by commas(,). and are separated by ‘: ’. Suppose you are reading a book or watching your favorite TV show and you come across a new word. You don’t know its meaning; what do you do in that case? Have you tried using a dictionary? How does it help us? In a dictionary, words are mapped to their meaning. You can search for a word and find its meaning.  Note: Here we are referring to online dictionaries.  https://kids.britannica.com/kids/browse/dictionary    find how the dictionary describes the following games:-  1. chess  2. cricket  3. football  4. ...