Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

finding anagrams in python

is_anagram = lambda x1, x2: sorted(x1) == sorted(x2)

print(is_anagram('silent','listen')) # True
print(is_anagram('elivs', 'dead')) # False
 
PREVIOUS NEXT
Tagged: #finding #anagrams #python
ADD COMMENT
Topic
Name
9+9 =