totalListe = [[2, 5, 7], [4, 5], [1]] for ytreListe in totalListe: for element in ytreListe: print(element, end=" ")