Checking if two strings are permutations of each other

前端 未结 30 1083
感情败类
感情败类 2020-12-05 08:19

How to determine if two strings are permutations of each other

30条回答
  •  天涯浪人
    2020-12-05 09:08

    >>>def isPermutation = lambda x, y: set([i for i in x]) == set([j for j in x])
    >>>isPermutation("rasp", "spar")
    >>>True
    

提交回复
热议问题