title: Python error - object of type 'bool' has no len() in python quiz
body: <p>I am having a bit of trouble in my python 2.7.3 code, i am making a quiz that imports a csv file with a list of keywords and definitions in it. I am importing the keywords into a list. I have the question working, but the answer to the question is not, no matter what i do, i keep getting this - </p>
  
  <pre><code>`Traceback (most recent call last):
    File "G:\new work (computerscience)\computerscience\coresworkn (programs)\main program\new code modle (b).py", line 94, in &lt;module&gt;
      answer()
    File "G:\new work (computerscience)\computerscience\coresworkn (programs)\main program\new code modle (b).py", line 67, in answer
      cans = random.choice(answ)==question
    File "C:\Python27\lib\random.py", line 274, in choice
      return seq[int(self.random() * len(seq))]  # raises IndexError if seq is empty
  TypeError: object of type 'bool' has no len()
  `
  </code></pre>
  
  <p>i have tried many things to solve it, and i don't understand where</p>
  
  <pre><code>return seq[int(self.random() * len(seq))] 
  </code></pre>
  
  <p>is coming from as it is not in my program. Please could someone tell me what i am doing wrong and how i can solve it. if you would like to see my program, i can provide the raw code if necessary. </p>
  
  <p>thanks. </p>