2 ms·
> Like what am I supposed to pass to sort(key)? And incidentally, this tuple unpacking problem comes up when sorting frequently... I suggest you look at namedt
by js8 10y ago
> Like what am I supposed to pass to sort(key)? And incidentally, this tuple unpacking problem comes up when sorting frequently...
I suggest you look at namedtuple: https://docs.python.org/3/library/collections.html#collections.namedtuple https://docs.python.org/3/library/collections.html#collectio...
I think you should watch some Raymond Hettinger's talks, he is discussing many little things like this.