这是我目前的尝试
quantity = int(input("How many do you want?? "))
while (quantity < 1 or isinstance(quantity, int) == False):
print("Error! Please enter a valid quantity value :)")
quantity = int(input("How many do you want?? "))
我尝试将 == 替换为 ,但两者都返回以下错误
ValueError: invalid literal for int() with base 10: 'a'
我该怎么办?