← Back to Users
pinkpuppy's activity in the archive.
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))
Can't you replace the call to reduce(lambda x,y: x+y, ...) with sum(...)?
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))
Can't you replace the call to reduce(lambda x,y: x+y, ...) with sum(...)?