title: Is there are more efficient method for creating a dictionary of letters mapped to letters shifted by a set integer?
body: <p>I have written a function which takes an integer and returns a dictionary where the letters of the alphabet are mapped to an alphabet shifted by the integer. It has the requirement that lowercase and uppercase letters must correpsond, that is if a -&gt; b then A-&gt;B.</p>
  <p>I'm fairly new to python and have little experience with creating lists so I'm just wondering if there is an alternative more efficient or even just more elegant way to complete the same outcome.</p>
  <pre><code>import string
  
  dictionary = []
  
  for letter in string.ascii_lowercase + string.ascii_uppercase:
      dictionary.append(letter)
      
     
  
  def build_shift(shift):
      
      shifted_dictionary = []
      
      for i in range(0,26):
          shifted_dictionary.append(dictionary[(i + shift) % 26])
          
      for i in range(26, 53):
          shifted_dictionary.append(dictionary[(( i + shift) % 26) + 26])
          
      return (shifted_dictionary)    
   
      
  mapped_dictionary = dict( zip(dictionary, build_shift(2)))  
  
  print(mapped_dictionary)
  </code></pre>