title: storing output to a list or dictionary
body: <p>I'm using the following code as a portion of a larger program that does some error checking on a Digital Cinema Package and tries to check the validity of the XML file that lists the asses on the DCP. ANyway, this is all still very much in its infancy and I'm hoping to learn more python as a result of it. </p>
  
  <pre><code>import xml.etree.ElementTree as etree
  import sys
  
  class Parser(object):
      def __init__(self, file_name):
          self.file_name = file_name
  
      def display(self, rename_this_list):
          tree = etree.parse(self.file_name)
          for node in tree.getiterator():
              for element in rename_this_list:
                  if element in node.tag:
                      uuid=(node.text)
                      #uuid = [s.strip('urn:') for s in uuid]
                      print(uuid)
  
  fname = sys.argv[1]
  key_search_words = ['KeyId']
  instance = Parser(fname)
  instance.display(key_search_words)
  </code></pre>
  
  <p>when I try to store the output so that each line is a list it doesn't format the way that I would expect. Minus the urn: I'd like to be storing each line with uuid: and the following info as an element of a list. </p>
  
  <pre><code>urn:uuid:9851b0f6-4790-0d4c-a69d-ea8abdedd03d
  urn:uuid:8317e8f3-1597-494d-9ed8-08a751ff8615
  urn:uuid:5d9b228d-7120-344c-aefc-840cdd32bbfc
  urn:uuid:1e32ccb2-ab0b-9d43-b879-1c12840c178b
  urn:uuid:44d04416-676a-2e4f-8995-165de8cab78d
  urn:uuid:906da0c1-b0cb-4541-b8a9-86476583cdc4
  urn:uuid:0fe2d73a-ebe3-9844-b3de-4517c63c4b90
  urn:uuid:862fa79a-18c7-9245-a172-486541bef0c0
  urn:uuid:aa2f1a88-7a55-894d-bc19-42afca589766
  urn:uuid:59d6eeff-cd56-6245-9f13-951554466626
  urn:uuid:14a13b1a-76ba-764c-97d0-9900f58af53e
  urn:uuid:ccdbe0ae-1c3f-224c-b450-947f43bbd640
  urn:uuid:dcd37f10-b042-8e44-bef0-89bda2174842
  urn:uuid:9dd7103e-7e5a-a840-a15f-f7d7fe699203
  </code></pre>