# Skat

I'm a fan of anagrams, so given two strings s1 and s2 write a program or function that outputs a truthy value if s2 is an anagram of s1, and a falsey value otherwise (not accounting for spaces and capital letters).

For example:

Input: s1 = "Anagram"; s2 = "Nag a ram"

true


Input: s1 = "stack overflow"; s2 = "fewer kool cats"

false


Input: s1 = "apple rocks"; s2 = "paler spock"

true


# Rules

• Program and function allowed.
• Shortest code in bytes wins.

Duck logo!

# 05AB1E, 8 bytes

lðδKJ€{Ë


Try it online!

• Wow, your answer and mine are literal polar opposites at the same cost; you remove spaces, I add them. Yours is definitely more efficient though. I'm removing mine, this was so much better lol. – Magic Octopus Urn Jun 23 '17 at 16:11
• If you sort first you can just remove the trailing newlines and dont have to join afterwards. tl;dr: l€{ðδÛË should also work (1 byte saving yay) – Datboi Jun 24 '17 at 22:23
• @Datboi Hmm, well, I'll rather answer the original challenge with that. – Erik the Outgolfer Jun 25 '17 at 5:43

# Jelly, 8 bytes

ŒlḟṢ¥€⁶E


Try it online!

# Python 3, 74 bytes

def f(a,b):print(g(a)==g(b))
g=lambda a:sorted(a.upper().replace(" ", ""))


Try it online!

• You can change def f(a,b):print(g(a)==g(b)) for lambda a,b:g(a)==g(b) – Cyoce Jun 23 '17 at 16:09
• You missed an extra space after .replace()'s comma. – manatwork Jun 23 '17 at 16:12

# Japt, 13 bytes

v rS á øVv rS


Test it