Answers for "how to print a unique element form a list in python"

3

how to find unique values in list in python

mylist = ['nowplaying', 'PBS', 'PBS', 'nowplaying', 'job', 'debate', 'thenandnow']
myset = set(mylist)
print(myset)
Posted by: Guest on February-25-2021
0

how to find unique sublist in list in python

set(tuple(sorted(i)) for i in lst)
Posted by: Guest on May-27-2020

Code answers related to "how to print a unique element form a list in python"

Python Answers by Framework

Browse Popular Code Answers by Language