What is the output of the following snippet?
dd = {"1": "0", "0": "1"} for x in dd.vals(): print(x, end="")
- 0 1
- the code is erroneous (the dict object has no vals() method)
- 0 0
- 1 0
Explanation: The following snippet will raise the AttributeError exception, because the dict object has no attribute named vals. Replacing vals with values should do the job.
More Questions: Python Essentials 1 (PE1) Course Final Test
Please login or Register to submit your answer