Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

weekly = [sum(daily[j:j+7]) for j in range(0, len(daily), 7)]

While I appreciate the general sentiment that high-level languages will take over the world, there is very little that's new in this article and I am not impressed by the showpiece Python code from the article. For loops are the future?



Well I guess the list comprehension and list slicing features in the above example are more interesting than the for loop.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: