from itertools import combinations, product

grille = [ n for n in range(1,50) ]

resultats_finaux = list()

for resultat in list( combinations( grille , 5 ) ):
    grille_restante = [ n for n in range(1,50) if n not in resultat ]
    r = list( resultat )
    for num in grille_restante:
        resultats_finaux.append( r + [num] )
