Answers for "python distinct substrings of list"

5

python list distinct

my_list = list(set(my_list))
Posted by: Guest on September-26-2020
0

how to get all distinct substrings in a string python

def substr(string):
    j=1
    a=set()
    while True:
        for i in range(len(string)-j+1):
            a.add(string[i:i+j])
        if j==len(string):
            break
        j+=1
    return a
Posted by: Guest on April-12-2021

Code answers related to "python distinct substrings of list"

Python Answers by Framework

Browse Popular Code Answers by Language