Question: 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 asa value in a dictionary. a. True b. False 2. What happens

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 above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!