Question
What is dictionary?

Answer

A dictionary is an ordered set of key:value pairs, where a key can be a number or a string and value can also be a number or a string. In Python a dictionary is created by putting the comma-separated key:value pairs of the dictionary in braces { }. For example, following is a small dictionary of three elements:

{'Dhoni':7, 'Kohli':18, 'Sachin':10}

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free