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
Source by codefantasy.org #
 
PREVIOUS NEXT
Tagged: #finding #anagrams #python
ADD COMMENT
Topic
Name
7+5 =