How to remove the duplicate values in a list

0 votes
a = [10,20,30,40,10,20,30,40,30,40,50,60]

how to remove only the duplicate values from this?

Mar 20, 2019 in Python by Waseem
• 4,540 points
1,089 views

1 answer to this question.

0 votes
a = [10,20,30,40,10,20,30,40,30,40,50,60]
s = set(a)
c = list(s)

print(c)

this will remove the duplicate values from the list.

answered Mar 20, 2019 by Mohammad
• 3,230 points

Related Questions In Python

0 votes
1 answer

How to count the number of elements in a list?

1) Count total number of numbers in ...READ MORE

answered Apr 14, 2021 in Python by VISHAKHA AGARWAL

edited Mar 5 5,432 views
0 votes
1 answer

How to get the ASCII values of a character in python?

You can get the ASCII value of ...READ MORE

answered Aug 23, 2020 in Python by Sajetha Selva
9,853 views
0 votes
1 answer

How to find the greatest number in a list in Python?

Consider a list of numbers. Write a ...READ MORE

answered Apr 14, 2021 in Python by anonymous

edited Mar 5 2,967 views
0 votes
2 answers
0 votes
1 answer
+4 votes
7 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,649 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP