def RemoveWordFromList(word, availableLetters):
   """
   Tries to remove each character in string word from the list of available 
   letters and returns the new list of letters or False if impossible.
   """
   # letters[:] creates a copy of the list
   lett = availableLetters[:]
   for char in word:
      if char in lett:
         # First try removing the actual character
         lett.remove(char)
      elif '?' in lett:
         # Otherwise try removing the wildcards "?".
         lett.remove('?')
      else:
         return False
   return lett