Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. def funWithAnagrams(s):
  2.  
  3. listOfSortedWords = []
  4. anotherone = []
  5. counter = 0
  6.  
  7. for word in s:
  8. listOfSortedWords.append(sorted(word))
  9.  
  10. for words in listOfSortedWords:
  11. anotherone.append("".join(words))
  12.  
  13.  
  14.  
  15. return list(set(anotherone))
  16.  
  17. print(funWithAnagrams(["doce","code","ecod","framer","frame"]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement