title: OrderedDict Merge and Append 0 if not
body: <pre><code>from collections import OrderedDict
  b= OrderedDict([('04-25', 5), ('04-23', 53), ('04-20', 3), ('04-2', 33)])
  # b = OrderedDict()
  c = OrderedDict([('04-20', 5), ('03-18', 53), ('03-13', 3), ('03-12', 133)])
  b_data = OrderedDict()
  for k , v in b.items()+c.items():
      b_data.setdefault(k,[]).append(v)
  
  f_data = OrderedDict()
  
  for k1, v1 in b_data.iteritems():
      if len(v1)==1:
          f_data[k1]=v1[0],0
      else:
          f_data[k1]=v1[0],v1[1]
  print f_data
  </code></pre>
  
  <p>I can get the output of f_data </p>
  
  <pre><code>OrderedDict([('04-25', (5, 0)), ('04-23', (53, 0)), ('04-20', (3, 5)), ('04-2', (33, 0)), ('03-18', (53, 0)), ('03-13', (3, 0)), ('03-12', (133, 0))])
  </code></pre>
  
  <p>But while merging b and c items , In f_data value[0] should be b value and value[1] should be c value. if there is no value put 0 in that.</p>
  
  <p>If the b items is empty also we have to keep 0 in value[0] and c items in value[1].</p>
  
  <p>If b and c have same key merge along with their values as I mentioned above.</p>
  
  <p>My expected output for the above data is ,</p>
  
  <pre><code>OrderedDict([('04-25', (5, 0)), ('04-23', (53, 0)), ('04-20', (3, 5)), ('04-2', (33, 0)), ('03-18', (0, 53)), ('03-13', (0, 3)), ('03-12', (0,133))])
  </code></pre>