Python - Check If Multiple String Entries Contain Invalid Chars
<p>Using Python v2.x, I have 3 variables that I want to ask the user for, as below:</p>

<pre><code> def Main():

    chars = set('0123456789')

    while True:
       Class_A_Input = raw_input('Enter Class A tickets sold: ')
       Class_B_Input = raw_input('Enter Class B tickets sold: ')
       Class_C_Input = raw_input('Enter Class C tickets sold: ')

        if any((c in chars) for c in Class_A_Input):
            break
        else:
            print 'Wrong'

    total_profit((int(Class_A_Input)), (int(Class_B_Input)), (int(Class_C_Input)))
</code></pre>

<p>How can I check if the user input is a valid input. IE: I want only numerical data entered. I have done this once before using 'chars = set('0123456789') and the 'WHILE' functions, but cannot seem to get it to work for multiple inputs.</p>

<p>Thanks for any help.</p>

<p>EDIT: I have put the code in now as I have it. I moved the 'int' to the 'total_profit' variable. How can I check all inputs?</p>
