Friday, November 16, 2007

Need to get into the habit of using Python sets

Periodically I have use cases where I want lists with unique values. And I so often write logic to do it on my own. You know, things like if 'hello' not in mylist: do x(). Well, I need to stop doing that and remember to use sets.

No comments: