/ Published in: Python
I made this ;) Python's operator class is what you need to know if you want to avoid using lambda functions or define your own helper functions in many cases.
Expand |
Embed | Plain Text
import operator map(operator.itemgetter(0), [(1,),(2,)])
Comments
Subscribe to comments
You need to login to post a comment.

I use this to convert db output (results from one column only) to a list.