Question
1) Consider the program snippet and select the correct answer for the output: : MItuple = ('MI', 'Michigan', 'Lansing') CAtuple = ('CA', 'California', 'Sacramento') TXtuple
1)
Consider the program snippet and select the correct answer for the output:
:
MItuple = ('MI', 'Michigan', 'Lansing')
CAtuple = ('CA', 'California', 'Sacramento')
TXtuple = ('TX', 'Texas', 'Austin')
states = [MItuple, CAtuple, TXtuple] # this will create a list of tuples
print(states[1][1:])
Group of answer choices
A) ('CA', 'California', 'Sacramento')
B) ('Texas', 'Austin')
C) ('California', 'Sacramento')
D) ('Michigan', 'Lansing')
2) Consider the following snippet:
abbrev = {} abbrev['MI'] = "Michigan" abbrev['MN'] = "Minnesota" abbrev['TX'] = "Texas" abbrev['CA'] = "California"
print(abbrev.keys())
Group of answer choices
A) keys(['MI', 'MN', 'TX', 'CA'])
B) ['MI', 'MN', 'TX', 'CA']
C) dict_keys([MI, MN, TX, CA])
D) dict_keys(['MI', 'MN', 'TX', 'CA'])
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started