Skip to content

Instantly share code, notes, and snippets.

@Jul10l1r4

Jul10l1r4/mess.py

Last active Feb 9, 2019
Embed
What would you like to do?
Analise combinatória, e remoção de repetições com strings
#!/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
You can’t perform that action at this time.