There are 3 arrangements of the word DAD, namely DAD, ADD, and DDA. How many arrangements are there of the word ENDURINGLY?
w = "ENDURINGLY"
import itertools
w = "ENDURINGLY"
combinations = set(itertools.permutations(w))
print(f"{w} have {len(combinations)} arrangements ")
Comments
Leave a comment