KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a Pythonic equivalent to Ruby's #each_cons ? In Ruby you can do this: array = [1,2,3,4] array.each_cons(2).to_a => [[1,2],[2,3],[3,4]]
Tags (comma-separated)
Save Edits
Cancel