Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

rename duplicates in list python

[v + str(mylist[:i].count(v) + 1) if mylist.count(v) > 1 else v for i, v in enumerate(mylist)]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rename #duplicates #list #python
ADD COMMENT
Topic
Name
1+4 =