Consider the following dictionary stateCapital:
stateCapital = {"AndhraPradesh":"Hyderabad", "Bihar":"Patna","Maharashtra":"Mumbai", "Rajasthan":"Jaipur"}
Find the output of the following statements:
i. print(stateCapital.get("Bihar"))
ii. print(stateCapital.keys())
iii. print(stateCapital.values())
iv. print(stateCapital.items())
v. print(len(stateCapital))
vi print("Maharashtra" in stateCapital)
vii. print(stateCapital.get("Assam"))
viii. del stateCapital["Andhra Pradesh"]
print(stateCapital)
Answers
Answered by
14
Answer:
hi
your answers
Explanation:
i)Patna
ii)dict_keys(['AndhraPradesh', 'Bihar', 'Maharashtra', 'Rajasthan'])
iii)dict_values(['Hyderabad', 'Patna', 'Mumbai', 'Jaipur'])
iv)dict_items([('AndhraPradesh', 'Hyderabad'), ('Bihar', 'Patna'), ('Maharashtra', 'Mumbai'), ('Rajasthan', 'Jaipur')])
v)4
vi)True
vii)None
viii)error
ix){'AndhraPradesh': 'Hyderabad', 'Bihar': 'Patna', 'Maharashtra': 'Mumbai', 'Rajasthan': 'Jaipur'}
#hope it helps you
please mark brainliest
Similar questions
Hindi,
4 months ago
Hindi,
4 months ago
Social Sciences,
8 months ago
Computer Science,
8 months ago
Math,
11 months ago
Chemistry,
11 months ago
English,
11 months ago