हिंदी

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.values())
एक पंक्ति में उत्तर

उत्तर

dict_values(['Hyderabad', 'Patna', 'Mumbai', 'Jaipur']): 'values()' function returns the list of the values 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. iii. | पृष्ठ २२४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×