title: Python Dictionary Array - One Line Per Value
body: <p>I have a dictionary with each array containing multiple values.</p>
  
  <p><code>upcthreadsmall.txt</code> contains a series of UPC Numbers "000381001184","000381102935","000381003263" etc.</p>
  
  <p>With the code below it displays as: </p>
  
  <pre><code>000381002365 : ['$265.29', '$299.00', '$270.70', '$299.00']
  </code></pre>
  
  <p>I'm wanting it to display as: </p>
  
  <pre><code>000381002365 : $265.29
  000381002365 : $299.00
  000381002365 : $270.70
  000381002365 : $299.00
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>def th(ur):
      base = "https://www.slickguns.com/search/apachesolr_search/"+ur
      regex = '&lt;td class="price-column"&gt;(.+?)&lt;/td&gt;'
      pattern = re.compile(regex)
      htmltext = urllib.urlopen(base).read()
      results = re.findall(pattern, htmltext)
      try:
          gmap[ur] = results
      except:"got an error"
  
  upclist = open("upcthreadsmall.txt").read()
  upclist = upclist.replace(" ","").split(",")
  
  threadlist = []
  
  for u in upclist:
      t = Thread(target=th,args=(u,))
      t.start()
      threadlist.append(t)
  
  for b in threadlist:
      b.join()
  
  
  for key, upc in gmap.items():
      print(key)
      for attribute, value in gmap.items():
          print('{} : {}'.format(attribute, value)
  </code></pre>