Cody Bable

Generation

generate functionFri, 30 Jun 2023

return the two biggest numbers in a list

def find_max(lst): biggest = lst[0] for item in lst: if item > biggest: biggest = item return biggest find_max([1, 2, 3, 4, 5, 6, 7])

Questions about programming?Chat with your personal AI assistant