title: TypeError: unhashable type: list in len(re.findall())
body: <p>I am programming a very simple KENO sim for a school assignment.
  Very basic Python knowledge.
  I am getting a TypeError: unhashable type: list</p>
  <p><strong>Here is my entire code if relevant:</strong> (Specific section below)</p>
  <pre><code>import random
  from random import randrange
  import sys
  import re
  def keno_sim():
  
      acceptable_values = list(range(1, 40))    
      number_no = int(input(&quot;How many numbers would you like to input? (MIN: 1 MAX: 40): &quot;))
      if number_no in acceptable_values:
          print (&quot;Pick your numbers, (between 1-80), seperated by commas &quot;)
          answer = input(&quot;&gt; &quot;).split(&quot;,&quot;)
      else:
          print (&quot;Please choose a number that's 1-40&quot;)
  
      random_number = random.sample(range(1, 80), number_no)
      print (&quot;Your numbers are:&quot;,answer)
      print (&quot;The generated numbers are:&quot;,random_number)
      matches = len(re.findall(answer, random_number))
  
      if matches &gt; 0.5 * random_number:
          print (&quot;You win!&quot;)
          print (&quot;You had&quot;,matches,&quot;matches!&quot;)
  
      elif matches &lt; 0.5 * random_number:
          print (&quot;Close! but wrong number!&quot;)
          print (&quot;You had&quot;,matches,&quot;matches!&quot;)
  
  print(&quot;This is KENO\n&quot;)
  print(&quot;GENERAL RULES:\nPick how many numbers you’d like to play, ranging from 1 to 40. Same numbers are drawn from the 80 available on the Keno game grid, if you match more than half of them, you win!&quot;)
  keno_sim()
  
  again = str(input(&quot;Do you want to play again (type yes or no): &quot;))
  if again == [&quot;yes&quot;, &quot;Yes&quot;, &quot;yess&quot;, &quot;y&quot;,&quot;ye&quot;, &quot;yea&quot;]:
      keno_sim()
  else:
      print (&quot;Thanks for playing ,name, !&quot;)
      sys.exit(0)
  </code></pre>
  <p><strong>Specific Section:</strong></p>
  <pre><code>    matches = len(re.findall(answer, random_number))
  
      if matches &gt; 0.5 * random_number:
          print (&quot;You win!&quot;)
          print (&quot;You had&quot;,matches,&quot;matches!&quot;)
  
      elif matches &lt; 0.5 * random_number:
          print (&quot;Close! but wrong number!&quot;)
          print (&quot;You had&quot;,matches,&quot;matches!&quot;)
  </code></pre>
  <p>Please give a specific fix or examples if possible</p>