Dictionary doubts

Iterations over a dictionary.

The functions must be in empty().
meant keys(), values()

  1. Access key using the build .keys()
  2. Iterate through all values using .values()
  3. Iterate through all key, and value pairs using items()
3 Likes

@sathsaran01
1.Access key using the built-in keywords .keys()
2. Iterate through all values using .values()
3. Iterate through all key, and value pairs using items()

Hope this helps.

2 Likes

In here, the .keys**()** .
it will be empty or shall we include any value within ()

@sathsaran01
That will be empty because .key() is a inbuilt function and it is used to find out the all the keys from the dictionary.

2 Likes