Inspired by the suggestion Recursive implementation of permutations in Python to use a set to avoid duplicated for permutations in a string, I was thinking of using a set as a general method to remove duplicated from a string (obviously order won't be preserved).
So If I have
str1 = 'Thiss'
set_str1 = set(str1)
print set_str1
Output set(['T','h', 'i', 's'])
The question is how to get the string back from this set. I was thinking that I can just use set and then convert it back to a string and then find permutations of the modified string. Is that an efficient way to go about it? Also I don't want to use itertools because I am just preparing for some interviews.