title: Python: Select Only Parts of an input?
body: <p>Sorry...I'm kind of a programming noob.  I was looking at some problem sets online and I found <a href="http://openbookproject.net/pybiblio/practice/wilson/powerball.php" rel="nofollow">THIS ONE</a>.  I wrote this much:</p>
  
  <pre><code>import random
  
  powerball=random.randint(1,42)
  
  a=random.randint(1,53)
  b=random.randint(1,53)
  c=random.randint(1,53)
  d=random.randint(1,53)
  e=random.randint(1,53)
  
  (f,g,h,i,j)=x=input("Your 5 Chosen Numbers:")
  </code></pre>
  
  <p>My problem is that I don't know how to make the program print something like "Please enter 5 numbers separated by only a comma" if more or less than five are entered.  Also how would I do that if I wanted it to display a different message every other time they made that mistake?</p>