find anagrams by Bakuriu

import sys
t=sys.stdin.read()
T=t.split("\n")
w=T[0]
for l in T[1:]:
\x09if sorted(list(l))==sorted(list(w)):print l

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top