3 ms·
Doesn't that python code give you a list of 500,500 elements, rather than a list of 1000 elements as originally specified?
by sokoloff 11y ago
Doesn't that python code give you a list of 500,500 elements, rather than a list of 1000 elements as originally specified?
- dragonwriter 11y agoIn both cases yes, and in both cases because I made the same stupid mistake when both languages have good means to do infinite streams and "take" equivalents. (And that's worse in the Java case, since I used those in the inner function but not the outer one.) So, I think I need to take a break from comment-box programming for a while; its clearly not working out for me today.