New answers tagged

6

Unnecessary construction of lists min_max = [int(input("Please enter the min value: ")), int(input("Please enter max value: "))] Unnecessary list construction here. It requires you to do min_max[] to get the correct value. Just remove the list construction and separate it into two variables. min_val, max_val = int(input("Please ...


4

Return tuples find_min_max is not well-suited to returning a list. Instead: Separate min_max into two variables, min_val and max_val return min_val, max_val Change your return hint to Tuple[int, int] This is what setup already does, though setup would benefit from unpacking the result from find_min_max, and should get its own return type hint. Grammar your ...


Top 50 recent answers are included