{"id":5321,"date":"2021-05-07T11:14:32","date_gmt":"2021-05-07T05:44:32","guid":{"rendered":"https:\/\/python-programs.com\/?p=5321"},"modified":"2021-11-22T18:42:53","modified_gmt":"2021-11-22T13:12:53","slug":"python-how-to-create-a-list-of-all-the-keys-in-the-dictionary","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-how-to-create-a-list-of-all-the-keys-in-the-dictionary\/","title":{"rendered":"Python : How to Create a List of all the Keys in the Dictionary ?"},"content":{"rendered":"

Dictionaries are Python\u2019s implementation of an associative list, which\u00a0may be a\u00a0<\/span>arrangement\u00a0<\/span>. A dictionary\u00a0may be a\u00a0<\/span>collection of key-value pairs that are stored together. A key and its value are represented by each key-value pair.<\/p>\n

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

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

dictionary = {'This': 100, 'is': 200, 'BTechGeeks': 300}<\/pre>\n

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

['This', 'is', 'BTechGeeks']<\/pre>\n

Create a List of all keys of a Dictionary<\/h2>\n

There are several ways to create a list of all keys of a dictionary some of them are:<\/p>\n