17
3
Despite having 17 questions tagged anagrams, we still don't have this question, so here it is.
Your Task
You must write a program or function that, when receiving a string, prints out all possible anagrams of it. For the purposes of this question, an anagram is a string that contains the same character as the original string, but is not an exact copy of the original string. An anagram does not have to be or contain actual words.
Input
You may accept the string, which may be of any length > 0, by any standard input method. It may contain any ASCII characters.
Output
You may output all of the possible anagrams of the inputted string in any standard way. You must not output the same string twice, or output a string equal to the input.
Other Rules
Standard Loopholes are disallowed
Scoring
This is code-golf, least bytes wins.
May we abide by the normal "program or function" standard? – Jonathan Allan – 2017-06-11T22:58:54.363
@JonathanAllan I think if its not explicitly mentioned, you may submit a program or a function. I've generally left that implicit in my questions with no problems – Digital Trauma – 2017-06-11T23:00:23.697
Yes, of course either a program or a function will work fine. – Gryphon – 2017-06-11T23:01:23.800
Closely related – FryAmTheEggman – 2017-06-12T03:35:58.393
@gryphon how are you editing things – Foxy – 2017-06-16T00:59:12.543
Umm, I'm hitting the edit button under them. It's not that hard. – Gryphon – 2017-07-05T12:06:49.947