Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Thank you :) 1. A list can be used as a value in a dictionary. a. True b. False 2. What happens when the
Python
Thank you :)
1. A list can be used as a value in a dictionary. a. True b. False 2. What happens when the get function is used and the key is not in the dictionary? a. The get function will return the key name b. The get function will return the value associated with the key c. The get function will create a new key with that name and default value d. None of the above 3. What does the following code output? eng2sp = \{'one':'uno', 'two':'dos', 'three':'tres' } print(list(eng2sp.keys()) + list(eng2sp.values())) a. ['one', 'two', 'three'] b. ['uno', 'dos', 'tres'] c. ['one', 'uno', 'two', 'dos', 'three', 'tres'] d. ['one', 'two', 'three', 'uno', 'dos', 'tres'] e. ['uno', 'dos', 'tres', 'one', 'two', 'three'] f. None of the above 4. What is the output of the following code? mydict ={ "key1": "value1", "key2": "value2" } myList = [] for b in mydict: myList.append(b) print(myList) a. ["value1", "value2"] b. ["key1", "key2"] c. [("key1", "value1"), ("key2", "value2")] d. None of the above 5. What is the method used to separate a string variable called peaches by spaces? a. peaches.split(" ".) b. peaches.translate() c. peaches.split(" ") d. A and B e. None of the aboveStep 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