def liste_to_dico(liste): d = {} for i in range(0,len(liste),2): d[ liste[i] ] = liste[i+1] return d