title: Python: How to check if two inputs A and B are anagrams without all punctuation, and all uppercase letters were lower case letters
body: <p>The first part of the question is to check if input A and input B are anagrams, which I can do easily enough.</p>
  
  <pre><code>s = input ("Word 1?")
  b = sorted(s)
  c = ''.join(b)
  t = input("Word 2?")
  a = sorted(t)
  d = ''.join(b)
  if d == c:
      print("Anagram!")
  else:
      print("Not Anagram!")
  </code></pre>
  
  <p>The problem is the second part of the question - I need to check if two words are anagrams if all of the punctuation is removed, the upper case letters turned to lower case, but the question assumes no spaces are used. So, for example, (ACdB;,.Eo,."kl) and (oadcbE,LK) are anagrams. The question also asks for loops to be used. </p>
  
  <pre><code>s = input ("Word 1?")
  s = s.lower()
  for i in range (0, len(s)):
      if ord(s[i]) &lt; 97 or ord(s[i]) &gt;122:
          s = s.replace(s[i],  '')
  b = sorted(s)
  c = ''.join(b)
  print(c)
  </code></pre>
  
  <p>Currently, the above code is saying the string index is out of range.</p>