We have provided a list of tuples called state_capitals. The first item in every tuple is the name of a US state and the second item in that tuple is the capital of that state. Write code that converts this data structure into a dictionary where the keys are state names and the values are state capitals. Assign the result to the variables capitals_dict. state_capitals = [ ('Michigan', 'Lansing'), ('Massachusetts', 'Boston'), ('Pennsylvania', 'Harrisburg'), ('New York', 'Albany') ]
+2
Answers (1)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “We have provided a list of tuples called state_capitals. The first item in every tuple is the name of a US state and the second item in ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Home » Computers & Technology » We have provided a list of tuples called state_capitals. The first item in every tuple is the name of a US state and the second item in that tuple is the capital of that state.