Skip to content

Instantly share code, notes, and snippets.

@Mulperi
Created July 20, 2021 06:52
Show Gist options
  • Save Mulperi/19fb61ec1c1fdeb850a17f195678ee7f to your computer and use it in GitHub Desktop.
Save Mulperi/19fb61ec1c1fdeb850a17f195678ee7f to your computer and use it in GitHub Desktop.
Python dict values to list
items = {
"123": {
"id": '123',
"title": 'title1',
"description": 'Description text',
"tag": 'Tag1',
"timestamp": '2021-06-21',
},
"456": {
"id": '456',
"title": 'title2',
"description": 'Decription text that is much much longer',
"tag": 'Tag2',
"timestamp": '2021-06-21',
}
}
print(items)
print(list(items.values()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment