KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have about half a million items that need to be placed in a list, I can't have duplications, and if an item is already there I need to get it's index. So far I have if Item in List: ItemNumber=List.index(Item) else: List.append(Item) ItemNumber=List.index(Item) The problem is that as the list grows it gets progressively slower until at some point it just isn't worth doing. I am limited to python 2.5 because it is an embedded system.
Tags (comma-separated)
Save Edits
Cancel