Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sorted string

class Permutations(object):

    def is_permutation(self, str1, str2):
        if str1 is None or str2 is None:
            return False
        return sorted(str1) == sorted(str2)
Source by nbviewer.org #
 
PREVIOUS NEXT
Tagged: #sorted #string
ADD COMMENT
Topic
Name
6+4 =