I am new at codding.I have a question.How do I add text to combinations and permutations I've created? Also, is there a way to delete repetitive states in a repetitive permutation, that is, to print like one? If so, how is it done?
colour = list(itertools.permutations(["green","green","green","yellow","yellow"],5))
print("first one is " + colour[0] + " and second one is " + colour[1] + " and third one is " + colour[2] + " and fourth one is " + colour[3] + " and fifth one is " + colour[4])
I wrote such code, but it doesn't work. At the beginning of the permutations of the top five elements, I want to add texts such as first to the first row and second to the second row, how can I do this? I hope I was able to explain. I will be glad if you can help.