Slark Posted December 29, 2015 Report Posted December 29, 2015 is incepator.. l-am facut si eu cum am stiut si cu ce am stiut..daca introduci de exemplu adOutput va fii: 1 | aa2 | ad3 | da4 | dditi da toate combinatile posibile (asa cred.. ca toate) dintr-un sir de "caractere"previewimport randomimport osnumar = 0increment = 0increment2 = 0combinatie = ""total_combinati = 0lista_sir_litere = []lista_combinati_posibile = []litere = input("Ori ce: ")numar_litere = len(litere)numar = numar_litere - 1for i in litere: lista_sir_litere.append(i)while increment2 < 10000: nr_rand = random.randint(0, numar) combinatie += lista_sir_litere[nr_rand] increment += 1 if increment == numar_litere: increment = 0 if combinatie not in lista_combinati_posibile: lista_combinati_posibile.append(combinatie) combinatie = "" os.system("cls") print("Loading....") increment2 -= 1 elif combinatie in lista_combinati_posibile: increment2 += 1 combinatie = "" else: continueos.system("cls")aranjate = sorted(lista_combinati_posibile)for i in aranjate: total_combinati += 1 print(total_combinati, "|", i)input() 1 Quote