Which dictionary method provides a view on dictionary's items in the form of tuples?

  • dict.items()
  • dict.tuples()
  • dict.values()
  • dict.viewitems()
The dict.items() method returns a view object that displays a list of a dictionary's (key, value) tuple pairs, making it useful for iterating through a dictionary's items.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *