Write Python Function Remove Duplicated Elements List Q37135489

Write a python function that will remove all duplicated elementsin the list


Solution


#Code.pylist1 = [1,3,2,41,2,3,1,3,12,1,2]list2 = list(set(list1))print(list2)

Output:

[1, 2, 3, 41, 12]

Output:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.