Skip to main content
10 events
when toggle format what by license comment
Jun 17, 2020 at 9:04 history edited CommunityBot
Commonmark migration
Feb 3, 2015 at 13:50 history edited Kroltan CC BY-SA 3.0
added thanks
Feb 3, 2015 at 10:17 history edited Kroltan CC BY-SA 3.0
added suggestions
Feb 3, 2015 at 9:51 comment added undergroundmonorail you don't need len, read the comment again :P
Feb 2, 2015 at 23:13 comment added Kroltan Thanks! I used filter in a previous version, forgot to remove it. Sadly I can't remove the first pair of square brackets since then it will be a generator, which has no len.
Feb 2, 2015 at 23:12 history edited Kroltan CC BY-SA 3.0
added the new suggestions
Feb 2, 2015 at 23:06 comment added xnor To count the number of elements of a list that satisfy a property, it's shorter to do sum(n>x for n in a). Also, it looks like you're not using s=filter. And for max, you don't actually need the list brackets; Python lets the function parens double as comprehension parens.
Feb 2, 2015 at 16:04 history edited Sp3000 CC BY-SA 3.0
A bit of syntax highlighting
Feb 2, 2015 at 15:51 history edited Kroltan CC BY-SA 3.0
added OP's suggestion
Feb 2, 2015 at 13:57 history answered Kroltan CC BY-SA 3.0