{"id":5902,"date":"2021-05-13T13:16:05","date_gmt":"2021-05-13T07:46:05","guid":{"rendered":"https:\/\/python-programs.com\/?p=5902"},"modified":"2021-11-22T18:42:44","modified_gmt":"2021-11-22T13:12:44","slug":"loop-iterate-over-all-values-of-dictionary-in-python","status":"publish","type":"post","link":"https:\/\/python-programs.com\/loop-iterate-over-all-values-of-dictionary-in-python\/","title":{"rendered":"Loop \/ Iterate over all Values of Dictionary in Python"},"content":{"rendered":"

In Python, dictionaries are useful data structures that use keys for indexing. They are an unordered sequence of items (key-value pairs), so the order does not matter. The keys are not able to be changed. Dictionaries, like lists, can hold a variety of data types, including integers, floats, strings, NaN, Booleans, lists, arrays, and even nested dictionaries.<\/p>\n

Given a dictionary, the task is to iterate over all values of the dictionary .<\/p>\n

Examples:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

dictionary = {'Hello': 600, 'world': 300, 'BTechGeeks': 900}<\/pre>\n

Output:<\/strong><\/p>\n

600\r\n300\r\n900<\/pre>\n

Traverse the values of Dictionary<\/h3>\n

There are several ways to traverse the values of dictionary some of them are:<\/p>\n