title: Does zip operation conserve order?
body: <p>I was reading the following example from geeksforgeeks:</p>
  <pre><code># Python code to demonstrate the working of  
  # zip() 
    
  # initializing lists 
  name = [ &quot;Manjeet&quot;, &quot;Nikhil&quot;, &quot;Shambhavi&quot;, &quot;Astha&quot; ] 
  roll_no = [ 4, 1, 3, 2 ] 
  marks = [ 40, 50, 60, 70 ] 
    
  # using zip() to map values 
  mapped = zip(name, roll_no, marks) 
    
  # converting values to print as set 
  mapped = set(mapped) 
    
  # printing resultant values  
  print (&quot;The zipped result is : &quot;,end=&quot;&quot;) 
  print (mapped) 
  </code></pre>
  <p>but if you see the result:</p>
  <blockquote>
  <p>The zipped result is : {('Shambhavi', 3, 60), ('Astha', 2, 70),
  ('Manjeet', 4, 40), ('Nikhil', 1, 50)}</p>
  </blockquote>
  <p>I would have expected to see {('Manjeet', 4, 40), ('Nikhil', 1, 50), ('Shambhavi', 3, 60), ('Astha', 2, 70)}. So this made me thing if I want to do a mathematical operation between two lists by using zip, will zip itself change the order? I tried this little code, but it seems it doesn't, but still, I have the doubt. Did I just have luck this time or do I have to worry about it? I really need that the position of the couples in (A,B) do not change.</p>
  <pre><code>A = range(1,14)
  B = range(2,15)
  
  data = [x + y for x, y in zip(A, B)]
  print(data)
  </code></pre>