Answer
(a) print(len(students)) This will print the number of elements in students dictionary that is 2.
(b) print(students.keys()) This will print all keys of students which is ["john", "peter"]
(c) print(students.values()) This will print all values of students which are [3, 2]
(d) print(students.items()) This will give all tuples corresponding to (key, value) pairs in a special data structure called dict_items, it will print dict_items([('john', 3), ('peter', 2)])
Work Step by Step
No explanation needed.