Last active
February 9, 2019 00:36
-
-
Save Jul10l1r4/a5edfae6b0f206b4e491152c9f6b4347 to your computer and use it in GitHub Desktop.
Analise combinatória, e remoção de repetições com strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
values = ["John","have","easy","pass"] | |
# Parse value | |
def parsing (x): | |
final=[] | |
for i in x: | |
final = final + i | |
return final | |
# Normal | |
def mess (x): | |
lista = [] | |
for i in values: | |
lista.append(x+i) | |
return lista | |
# Output | |
new = parsing(list(map(mess, values))) | |
print("---[Combinatories analysis]---") | |
print(set(new)) | |
print("---[Lenght for each values]---") | |
print("Root values:"+ str(len(values))) | |
print("Results: "+str(len(new))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment