title: How do I make python encrypt both uppercase and lowercase?
body: <p>Basically I want the ciphered phrase as the output with both uppercase being ciphered to uppercase and lowercase being ciphered to lowercase but not any spaces or symbols are ciphered. It can encrypt a paragraph consisting of all upper case and a paragraph consisting of all lower case but not a mix of the two.  here is what I have.</p>
  
  <pre><code>def encrypt(phrase,move):
  encription=[]
  for character in phrase:
      a = ord(character)
      if a&gt;64 and a&lt;123:
          if a!=(91,96):
              for case in phrase:
                          if case.islower():
                              alph=["a","b","c","d","e","f","g","h","i","j","k","l","m","n",
                                    "o","p","q","r","s","t","u","v","w","x","y","z"]
                              dic={}
                              for i in range(0,len(alph)):
                                  dic[alph[i]]=alph[(i+move)%len(alph)] 
                                  cipherphrase=""  
                              for l in phrase:  
                                  if l in dic:  
                                      l=dic[l]  
                                  cipherphrase+=l
                                  encription.append(chr(a if 97&lt;a&lt;=122 else 96+a%122))
                              return cipherphrase
                          else:
                              ALPH=["A","B","C","D","E","F","G","H","I","J","K","L","M","N",
                                    "O","P","Q","R","S","T","U","V","W","X","Y","Z"]
                              DIC={}
                              for I in range(0,len(ALPH)):
                                  DIC[ALPH[I]]=ALPH[(I+move)%len(ALPH)]
                                  cipherphrase=""
                              for L in phrase:
                                  if L in DIC:
                                      L=DIC[L]
                                  cipherphrase+=L
                                  encription.append(chr(a if 97&lt;a&lt;=122 else 96+a%122))
                              return cipherphrase
  </code></pre>
  
  <p>I know its a lot but as you can see im not very good</p>