def separe(tab): '''Separe les 0 et les 1 dans le tableau tab''' gauche = 0 droite = ... while gauche < droite: if tab[gauche] == 0 : gauche = ... else : tab[gauche] = ... tab[droite] = ... droite = ... return tab