Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

no repetir elementos en una lista python

from collections import OrderedDict

myList = [2, 1, 2, 3, 0, 6, 7, 6, 8, 0, 4, 8]

myList.append(9)

final_list = list(OrderedDict.fromkeys(myList))

print(final_list)
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #repetir #elementos #en #una #lista #python
ADD COMMENT
Topic
Name
1+5 =