4 ms·
You don't need the list comprehension for python - just 2 * sum(range(1, 13))
by why_only_15 7y ago
You don't need the list comprehension for python - just 2 * sum(range(1, 13))
- cool-RR 7y agoAnd drop the 1, too
- Godel_unicode 7y agoI prefer the explicit example for being explicit, I find it more pythonic. GPs example is perfect Python; every character has meaning, and it's extremely readable even for non-programmers.