Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

two strings are anagram or not check python

// for 2 strings s1 and s2 to be anagrams
// both conditions should be True
// 1 their length is same or 
len(s1)==len(s2)
// 2 rearranging chars alphabetically make them equal or 
sorted(s1)==sorted(s2)
 
PREVIOUS NEXT
Tagged: #strings #anagram #check #python
ADD COMMENT
Topic
Name
8+5 =