Hi!!!

I have a List with letters with a max length of 10. Lets say for example I have the letters "D","A","D","O". How can I get all the possible combinations that these letters can form like:
DADO
DAOD
DODA
DOAD
DDAO
DDOA
ADDO
ADOD
AODD
ODDA
ODAD
OADD

In this case i would get 4!/2! combinations because there are two "D". So to have this DADO and switch the "D" i get the same that why I divide it by 2!.