A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jinja2cpp/Jinja2Cpp/issues/141 below:

Implement 'slice' filter · Issue #141 · jinja2cpp/Jinja2Cpp · GitHub

Implement slice filter according the jinja2 documentation:

Slice an iterator and return a list of lists containing those items.
If you pass it a second argument it’s used to fill missing values on the last iteration.

For instance, slice(3, 0) applied to the list [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] should give the list of lists of three items each:

[[1, 2, 3],
 [4, 5, 6],
 [7, 8, 9],
 [10, 11, 12],
 [13, 14, 15],
 [16, 0, 0]]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4