Solutions – Overview of Python Collections – dict and set

Exercises – Dicts and Tuples¶ Let us go through some exercises related to dict and tuple. Exercise 1 – Access all the values¶ Get the values from the below dict in the form of a list. In [1]: d = { ‘order_id’: 1, ‘order_date’: ‘2013-07-25’, ‘order_customer_id’: 100, ‘order_status’: ‘COMPLETE’ } In [2]: def get_values(d): l = d.values() …

Solutions – Overview of Python Collections – dict and set Read More »