Remove duplicates in a list of numbers

1
2
def remove_duplicates(listNumbers):
total=[]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Simple function that remove duplicates in a list of numbers

2 Responses

Let's try to convert a list to set and vice versa

x = [1, 2, 1, 2]
print list(set(x))

profit :)

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.