Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

distinct string list in python

s = ["ass", "asss"]
ln = len(s)
lnS = len(list(set(s)))
if ln == lnS:
    print("List is distinct")
else:
    print("List isn't distinct")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #distinct #string #list #python
ADD COMMENT
Topic
Name
3+8 =