2022-2023/1NSI/09_Recherche_par_dichotomie.../algos/1B_max.py

7 lines
152 B
Python

def maximum(liste):
candidat = liste[0]
for element in liste:
if element > candidat:
candidat = element
return candidat