title: Python Caesar Cipher keeping spaces
body: <p>I need help keeping the spaces. I have the caesar cipher functioning,
  but I want it to keep the spaces and can't figure out how to do that.</p>
  
  <pre><code>sentence = raw_input("Please enter a sentence : ").lower()
  newString = ''
  validLetters = "abcdefghijklmnopqrstuvwxyz"
  space = [ ]
  for char in sentence:
      if char in validLetters or char in space:
          newString += char
          shift = input("Please enter your shift : ")
          resulta = []
  for ch in newString:
      x = ord(ch)
      x = x + shift
      resulta.append(chr(x if 97 &lt;= x &lt;= 122 else 96 + x % 122))
  print sentence
  print("")
  print("Your encryption is :")
  print("")
  print ''.join(resulta)
  </code></pre>
  
  <p>It outputs correct code but removes the spaces. How can I keep the spaces on encryption?</p>