detect max min in list code example Example: find max value in list python mylist = [1, 7, 3, 12, 5] min_value = min(mylist) max_value = max(mylist)