Finding the Min and Max of User Inputs
<p>I'm learning Python, and in trying to find out the min and max values of user number inputs, I can't seem to figure it out.</p>

<pre><code>count = 0
x = []
while(True):
    x = input('Enter a Number: ')
    high = max(x)
    low = min(x)
    if(x.isdigit()):
        count += 1
    else:
        print("Your Highest Number is: " + high)
        print("Your Lowest Number is: " + low)
        break
</code></pre>

<p><code>x</code> is a list, and to append an item to a list, you must call the <code>append</code> method on the list, rather than directly assigning an item to the list, which would override the list with that item.</p>

<p>Code:</p>

<pre><code>count = 0
x = []
while(True):
    num = input('Enter a Number: ')
    if(num.isdigit()):
        x.append(int(num))
        count += 1
    elif(x):
        high = max(x)
        low = min(x)
        print("Your Highest Number is: " + str(high))
        print("Your Lowest Number is: " + str(low))
        break
    else:
        print("Please enter some numbers")
        break
</code></pre>

python python-3.x