title: Python - updating a set
body: <p>I'm trying to update a set of nodes with their positions (coordinates) using Python.   </p>
  
  <pre><code>n = 5  #number of current nodes
  vertices = []
  vertices=list(range(n)) # list of vertices=[0,1,2,3,4]
  </code></pre>
  
  <p>I'm creating a random set of points as follows for each element in vertices: </p>
  
  <pre><code>pos = {i:(random.randint(0,50),random.randint(0,50)) for i in vertices}
  </code></pre>
  
  <p>Also, I have another list(called "<code>s</code>") with some coordinates and I'm enumerating those elements in "<code>s</code>" to add an index(to continue with indices in "<code>vertices</code>") to each coordinate in "<code>s</code>". </p>
  
  <pre><code>for index, i in enumerate(s , vertices[-1]+1):
      print(index, i)
  </code></pre>
  
  <p>Then, I'm getting my output as </p>
  
  <pre><code>5 (29.5, 34.0)
  6 (20.0, 25.75)
  7 (23.75, 36.0)
  </code></pre>
  
  <p>Now I need to update my set "<code>pos</code>" with these points and their corresponding indices. How can I do that? </p>