मराठी

Consider the following dictionary stateCapital: stateCapital = {"AndhraPradesh":"Hyderabad", "Bihar":"Patna","Maharashtra":"Mumbai", "Rajasthan":"Jaipur"} Find the output of the following statement - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Consider the following dictionary stateCapital:

stateCapital = {"AndhraPradesh":"Hyderabad",
"Bihar":"Patna","Maharashtra":"Mumbai",
"Rajasthan":"Jaipur"}

Find the output of the following statement:

print(stateCapital.get("Assam"))
एका वाक्यात उत्तर

उत्तर

None: 'get()' function returns 'None' if the key is not present in the dictionary.

shaalaa.com
Dictionary Methods and Built-in Functions
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 10: Tuples and Dictionaries - Exercise [पृष्ठ २२४]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
पाठ 10 Tuples and Dictionaries
Exercise | Q 2. vii. | पृष्ठ २२४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×