search list.max() code example Example 1: python largest value in list >>> list = [1, 3, 2, 0] >>> max(list) 3 Example 2: max of list with index a.index(max(a))