saving . . . saved remove multiple occurrences of same element has been deleted. remove multiple occurrences of same element has been hidden .
remove multiple occurrences of same element
Title
Question
How to remove multiple occurrences of same elements at single step?

Python-3.4.3 Getting-started-with-Lists 00-01 min 0-10 sec 22-06-19, 4:19 p.m. Petta

Answers:

You can remove multiple occurrences from a list with list comprehension

def remove_values_from_list(the_list, val):
    return [value for value in the_list if value != val]
18-04-20, 9:09 p.m. ankitrj.iitb


#suppose l is the list, then follow these:
s=set(l)
l=list(s)
20-04-20, 1:59 p.m. logeshavanayyalu5166@gmail.com


Log-in to answer to this question.