Really struggling with this at the moment and need some help as to where I am going wrong with this all.
So currently just doing some practice work and running into an error. Seeing if numbers that a user enters into 'user input' within an array are bigger than a set integer. I want to iterate over the number in the array then have an if statement print out a message saying the number they entered is too high. I then want the loop to start back over. The error I am getting is that the loop prints the message but does not iterate back over the while loop and instead just exits. I do not know why this is happening and can't figure it out. Any help would be much appreciated, Thank you in advance.
user_lottery_numbers = []
while type(user_lottery_numbers) is not int:
try:
user_lottery_numbers = [int(x) for x in input("Please enter your numbers followed by the enter key:").strip(",").split(",")]
for x in user_lottery_numbers:
if (x) > 60:
print ("The number %s you have entered is too high please stay within the range" % (x))
continue
if len(user_lottery_numbers) <6 or 0 in user_lottery_numbers:
print ("Not enough numbers and or you have made one number zero by mistake")
continue
if len(user_lottery_numbers) >6:
print ("Too many numbers")
continue
print (user_lottery_numbers)
print ("Thank you for the correct format of numbers")
break
except ValueError:
print ("You must only enter 6 integers followed by the enter key")