Skip to content

Instantly share code, notes, and snippets.

@keum
Created September 18, 2013 18:13
Show Gist options
  • Save keum/6613144 to your computer and use it in GitHub Desktop.
Save keum/6613144 to your computer and use it in GitHub Desktop.
Question: How to combine two list into one?
#How to combine two separate list below into a one list?
#Have dictionary data within list
a = [{'A':23},{'B':50}]
b = [{'A':50},{'B':100},{'C':150}]
#Result i need
c = [{'A':23,50},{'B':50,100},{'C':150}]
===
#adding two dictionary c =dict(a.items() + b.items()) but now sure how to work with list that has dictionary embeded???
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment