title: Check, using a list, if a string contains a certain letter or number
body: <p>The question I'm answering requires you to validate a Car Reg Plate. It must look for a sequence of two letters, then three numbers, then three letters, otherwise return a message like "not a valid postcode"</p>
  
  <p>I need to know how to check if a string contains a certain letter, or number, by comparing it with a list.</p>
  
  <p>So far, I've got this:</p>
  
  <pre><code># Task 2
  
  import random
  import re
  
  def regNumber():
      # Generate a Car Reg Number
      letters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
      numbers = ["1","2","3","4","5","6","7","8","9","0"]
  
      letter1 = random.choice(letters)
      letter2 = random.choice(letters)
      number1 = random.choice(numbers)
      number2 = random.choice(numbers)
      letter3 = random.choice(letters)
      letter4 = random.choice(letters)
      letter5 = random.choice(letters)
      licensePlate = (letter1 + letter2 + number1 + number2 + letter3 + letter4 + letter5)
      return licensePlate, letters, numbers
  
  carReg, letters, numbers = regNumber()
  
  print(carReg)
  if letters not in carReg: print("Success")
  </code></pre>
  
  <p>However, I get this error:</p>
  
  <pre><code>TypeError: 'in &lt;string&gt;' requires string as left operand, not list
  </code></pre>
  
  <p>Any help appreciated.</p>