mirror of
https://github.com/Fare-spec/cours.git
synced 2025-12-07 10:50:36 +00:00
Add 'divise2' function that divide liste in two parts
This commit is contained in:
@@ -17,6 +17,12 @@ def taille(liste):
|
||||
a+=1
|
||||
return a
|
||||
|
||||
def divise2(liste):
|
||||
n = taille(liste)
|
||||
droite, gauche = partition(liste,0,n//2)
|
||||
return droite,gauche
|
||||
|
||||
|
||||
|
||||
def renverser(liste):
|
||||
result = fifo.creer_liste()
|
||||
|
||||
Reference in New Issue
Block a user