KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have to check presence of millions of elements (20-30 letters str) in the list containing 10-100k of those elements. Is there faster way of doing that in python than set() ? import sys #load ids ids = set( x.strip() for x in open(idfile) ) for line in sys.stdin: id=line.strip() if id in ids: #print fastq print id #update ids ids.remove( id )
Tags (comma-separated)
Save Edits
Cancel