Sujet : in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3)) De : HenHanna (at) *nospam* devnull.tb (HenHanna) Groupes :comp.lang.pythoncomp.lang.misc Date : 09. Jun 2024, 22:20:20 Autres entêtes Organisation : A noiseless patient Spider Message-ID :<v456ak$3pmpo$1@dont-email.me> User-Agent : Mozilla Thunderbird
Chunk, ChunkC -- nice simple way(s) to write these in Python? (Chunk '(a a b a a a b b)) ==> ((a a) (b) (a a a) (b b)) (Chunk '(a a a a b c c a a d e e e e)) ==> ((a a a a) (b) (c c) (a a) (d) (e e e e)) (Chunk '(2 2 foo bar bar j j j k baz baz)) ==> ((2 2) (foo) (bar bar) (j j j) (k) (baz baz)) _________________ (ChunkC '(a a b b b)) ==> ((a 2) (b 3)) (ChunkC '(a a b a a a b b)) ==> ((a 2) (b 1) (a 3) (b 2))
Date
Sujet
#
Auteur
9 Jun 24
in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))