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 in Python by Waseem
• 4,160 points
16 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 by Mohammad
• 2,820 points

Related Questions In Python

0 votes
1 answer

How to count the number of elements in a list?

To count the number of elements of ...READ MORE

answered May 27 in Python by Nisa
• 1,090 points
12 views
0 votes
0 answers

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

Is there a function for this task ...READ MORE

Jul 17 in Python by Waseem
• 4,160 points
14 views
+2 votes
2 answers

In a list of dictionaries, how can I find the minimum calue in a common dictionary field.

There are several options. Here is a ...READ MORE

answered Apr 10, 2018 in Python by charlie_brown
• 7,710 points
52 views
+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 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 169 views
0 votes
1 answer