0
Dictionaries (literally no clue)
What is the result of this code? fib = {1: 1, 2: 1, 3: 2, 4: 3} print(fib.get(4, 0) + fib.get(7, 5))
1 Answer
+ 13
The get (x, y) (x-key, y-value) method returns the value x if it is in the dictionary, if it is not, then returns y. 4 in the dictionary is and has a value of 3, therefore returns 3. 7 in the dictionary is not therefore returns 5