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
Science,
4 months ago
Social Sciences,
9 months ago
Computer Science,
9 months ago
Math,
1 year ago
Chemistry,
1 year ago
English,
1 year ago