title: time and space complexity comparison: adding elements of two lists to a dict through loop or dict(zip(s, t))
body: <p>I'm new to python and am trying to figure out the concept of time and space complexity. I want to make a dict of two lists, both of the same length. I can do this in the following two ways:</p>
  
  <p>1) by looping over the lists and adding them to the dict:</p>
  
  <pre><code> dictLists = {}
          for i in range(0,len(list1)):
              dictLists[list1[i]] = list2[i]
  </code></pre>
  
  <p>2) by zipping the lists and then making a dict from that:</p>
  
  <pre><code>       dictZip = dict(zip(list1,list2))
  </code></pre>
  
  <p>To my understanding, the time complexity of the first method should be O(N) where N is the length of the lists. However, I do not know the time complexity for the second option, except the fact that the zip operation itself takes O(1) time complexity. </p>
  
  <p>What would be the difference in time complexity between these two methods? Would there be additional space complexity in the second method due to an extra zip object?</p>