Question

What is the purpose of the keys() method in a dictionary?

A To get the values of a dictionary
B To get the keys of a dictionary
C To add a new key-value pair to a dictionary
D To remove a key-value pair from a dictionary
E To sort a dictionary
Practice Next

Hey! Ask a query