Last active
October 14, 2017 00:25
-
-
Save Kalimaha/1baffd524519ec81617d580dc3a11e54 to your computer and use it in GitHub Desktop.
iterate key, value for each dict in a list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| headers = [{'Content-Type': 'application/json'}, {'Accept', '*/*'}] | |
| for key, value in sum(list(map(list, map(dict.items, headers))), []): | |
| print(str(key) + ': ' + str(value)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment