Re bonjour, quelqu'un pourrait-il me traduire en français les lignes commençant par trois points d'interrogation; ou que font concrètement ces lignes.
D'avance merci.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 def permuter(chaine): ??? liste=[chaine[0]] n=2 l=1 while n <=len(chaine): ??? for mot in list(liste): ??? for i in range(n): ??? liste.append(mot[:i]+chaine[l]+mot[i:]) n+=1 l+=1 ??? return [r for r in liste if len(r)==len(chaine)]
Partager