Slashdot Mirror


User: pinkpuppy

pinkpuppy's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Re:sum instead of reduce on Solving the Knight's Tour Puzzle In 60 Lines of Python · · Score: 1

    Actually, the sum and map is better replaced with len and filter

    key=lambda c: len(filter(lambda j: InRangeAndEmpty(c[0]+j[0], c[1]+j[1]), jumps))

  2. sum instead of reduce on Solving the Knight's Tour Puzzle In 60 Lines of Python · · Score: 1

    Can't you replace the call to reduce(lambda x,y: x+y, ...) with sum(...)?