title: How to create a dynamic list into a dictionary / creating an 3D Array
body: <p>I want to have a dynamic list.
  What I know about the list is it has 3 dimensions </p>
  
  <p>The size of the third dimension is different</p>
  
  <p>For every result I want one (1) item with the original (train) xy coordinates and another item which is a list of the matches</p>
  
  <p>How long the list of the matches is depends on every result</p>
  
  <pre><code>coordinates=[]
  for i in range(len(result)):
     xy = []
     destination={}
     destination['train']=result[i]
     for m in matches:
          xy.append(m)
     destination['query'] = xy
     coordinates.append(destination)
  </code></pre>
  
  <p>(Maybe another explaination what I'm thinking about: "coordinates" should be a list with the results, for each result an own dictonary with the original xy-cordinates and the xy matches (the xy-lists have a different lenght for every result. On every loop it should create an empty list "xy" and an empty dict "destination")</p>
  
  <p>This is how the list should turn out:</p>
  
  <pre><code>coordinates={
  {train: (45,3), query: {(1,1),(2,1)}},
  {train: (1,100), query: {(1,9)}}
  }
  </code></pre>
  
  <p>so if I do 
  <code>coordinates[1].get(query)</code>
  it shows me
     <code>(1,1),(2,1)</code></p>