Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

unique character 03 set and length comparison

class UniqueCharsSet(object):

    def has_unique_chars(self, string):
        if string is None:
            return False
        return len(set(string)) == len(string)
Source by nbviewer.org #
 
PREVIOUS NEXT
Tagged: #unique #character #set #length #comparison
ADD COMMENT
Topic
Name
5+6 =