[Solved] I cant get the min or the max of a tuple


# omitted part
try:
    price = list(input("Enter the price of the sweet: "))
except ValueError:
    print("Enter an integer")

Here you change str applying list to it. For example,

read_value="1234"
list(read_value)
Out:
['1', '2', '3', '4']  # type: list of str

To fix this issue, use int:

# omitted part
try:
    price = int(input("Enter the price of the sweet: "))
except ValueError:
    print("Enter an integer")

For single input,

read_value="1234"
int(read_value)
Out:
1234  # type: int

solved I cant get the min or the max of a tuple