43 ms·
The zen never says TOOWTDO, it says TO(APOO)OWTDI. (That's "there's one, and preferably only one, obvious way to do it.) `reduce(op.add, [x, y])` works. Python
by joshuamorton 8y ago
The zen never says TOOWTDO, it says TO(APOO)OWTDI. (That's "there's one, and preferably only one, obvious way to do it.)
`reduce(op.add, [x, y])` works. Python could remove it's infix ops and use only prefix ones. But prefix ones aren't obvious. And as Guido says, readability matters.