title: python else statement syntax error
body: <p>when I run this, I get the following error: Does anybody know what might be causing this? The purpose of this program is to create an array, remove all punctuation from the array, and remove all lowercase characters from the array</p>
  
  <p>File "words.py", line 37
      else:
         ^
  SyntaxError: invalid syntax</p>
  
  <p>shell returned 1</p>
  
  <pre><code>import sys
  from scanner import *
  arr=[]
  def main():
      print("the name of the program is",sys.argv[0])
      for i in range(1,len(sys.argv),1):
          print("   argument",i,"is", sys.argv[i])
      tokens = readTokens("text.txt")
      cleanTokens = depunctuateTokens(arr)
      words = decapitalizeTokens(result)
  
  
  def readTokens(s):
      s=Scanner("text.txt")
      token=s.readtoken()
      while (token != ""):
          arr.append(token)
          token=s.readtoken()
      s.close()
      return arr
  
  def depunctuateTokens(arr):
      result=[]
      for i in range(0,len(arr),1):
          string=arr[i]
          cleaned=""
          punctuation="""!"#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_`{|}~"""
          for i in range(0,len(string),1):
              if string[i] not in punctuation:
                  cleaned += string[i]
          result.append(cleaned)
      print(result)
      return result
  
  
  def decapitalizeTokens(result):
      if (ord(result) &lt;= ord('Z')):
          return chr(ord(result) + ord('a') - (ord('A'))
      else:
          return result
  
  main()
  </code></pre>