Hacker News new | ask | show | jobs
by spott 3347 days ago
> I like lambda a, b: a + b syntax better than lambda a_b: a_b[0] + a_b[1]

uh, `lambda a,b: a + b` works in 3.6...

> I prefer ... to return lists rather than iterable:

Why? I'm just curious. Iterables are much more flexible than lists, unless you need random access... at which point list(...) works pretty well.

1 comments

he mean `map(lambda (a, b): a+b, [(1, 2), (3, 4)])`