Python - EOF while scanning triple-quoted string literal
<p>I am trying to write a basic Hangman game and whenever I try to execute it, I get the same error mentioned in the title. I have combed over my code a ton, and while I have fixed some issues I noticed, I still get the same error. Any help? Thanks.</p>

<pre><code>import random
HANGMANPICS = ['''

+---+
|   |
  |
  |
  |
  |
=========''', '''

+---+
|   |
o   |
  |
  |
  |
=========''', '''

+---+
|   |
o   |
|   |
  |
  |
=========''', '''

 +---+
 |   |
 o   |
/|\  |
   |
   |
=========''', '''

+---+
|   |
 o   |
/|\  |
/    |
  |
=========''', '''

 +---+ 
 |   |
 o   |
/|\  |
/ \  |
  |
=========''', '''
</code></pre>

<p>words = 'ant baboon badger bat bear beaver camel cat clam cobra cougar coyote crow deer dog donkey duck eagle ferret fox frog goat goose hawk lion lizard llama mole monkey moose mouse mule newt otter owl panda parrot pigeon python rabbit ram rat raven rhino salmon seal shark sheep skunk sloth snake spider stork swan tiger toad trout turkey turtle weasel whale wolf wombat zebra' .split()</p>

<pre><code>def getRandomWord(wordList):

    wordIndex = random.randint(0, len(wordList) - 1)
    return wordList[wordIndex]

def displayBoard(HANGMANPICS,  missedLetters, correctLetters, secretWord):
    print(HANGMANPICS[len(missedLetters)])
    print ()

    print('Missed letters:', end=' ')
    for letter in missedLetters:
        print(letter, end=' ')
    print()

    blanks = '_' * len(secretWord)

    for i in range(len(secretWord)):
        if secretWord[i] in correctLetters:
            blanks = blanks[:i] + secretWord[i] + blanks[i+1:]

    for letter in blanks:
        print(letter, end=' ')
    print()

def getGuess(alreadyGuessed):

    while True:
      print('Guess a letter.')
      guess = input()
      guess = guess.lower()
      if len(guess) != 1:
        print('Please enter a single letter.')
      elif guess in alreadyGuessed:
        print('You have already guessed that letter. Choose again.')
      elif guess not in 'abcdefghijklmnopqrstuvwxyz':
        print('Please enter a LETTER.')
      else:
        return guess

def playAgain():

  print('Do you want to play again? (yes or no)')
  return input().1ower().startswith('y')


  print('H A N G M A N')
  missedLetters = ''
  correctLetters = ''
  secretWord = getRandomWord(words)
  gameIsDone = False

  while True:
        displayBoard(-HANGMANPICS, missedLetters, correctLetters, secretWord)


  guess = getGuess(missedLetters + correctLetters)

  if guess in secretWord:
    correctLetters = correctLetters + guess


    foundAllLetters = True
    for i in range(len(secretWord)):
        if secretWord[i] not in correctLetters:
            foundAllLetters = False
            break
    if foundAllLetters:
        print('Yes! The secret word is "' + secretWord + '"! You have won!')
        gameIsDone = True
  else:
    missedLetters = missedLetters + guess


    if len(missedLetters) == len(HANGMANPICS) - 1:
            displayBoard(HANGMANPICS, missedLetters, correctLetters, secretWord)
            print('You have run out of guesses!\nAfter ' + str(len(missedLetters)) + ' missed guesses and ' + str(len(correctLetters)) + ' correct guesses, the word was "' + secretWord + '"')
            gameIsDone = True


if gameIsDOne:
    if playAgain():
        missedLetters = ''
        correctLetters = ''
        gameisDone = False
        secretWord = getRandomWord(words)
else:
    break
</code></pre>

<p>You don't end the list of HANGMANPICS - your code appears to be</p>

<pre><code>                                          #\/ starts a new list entry which never ends
HANGMANPICS = ['''first''', '''second''', ''' 
words = 'ant baboon badger' .split()
</code></pre>

<p>and it needs to be</p>

<pre><code>                                      # \/ list ends
HANGMANPICS = ['''first''', '''second''']
words = 'ant baboon badger'.split()

                         #^ and incidentally, no space here
</code></pre>

python string syntax eof