[Python] python equivalent to clojure's partition-all?

Discussão em 'Python' iniciado por Stack, Fevereiro 13, 2025.

  1. Stack

    Stack Membro Participativo

    looking for something in python's standard lib or a syntax trick.

    for non-clojure programmers, partition-all should have these semantics:

    partition_all(16, lst) == [lst[0:16], lst[16:32], lst[32:48], lst[48:60]]

    assuming len(lst) == 60

    Continue reading...

Compartilhe esta Página