Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <mailman.107.1717985138.2909.python-list@python.org>
Deutsch   English   Français   Italiano  
<mailman.107.1717985138.2909.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail
From: <avi.e.gross@gmail.com>
Newsgroups: comp.lang.python
Subject: RE: in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))
Date: Sun, 9 Jun 2024 22:05:33 -0400
Lines: 42
Message-ID: <mailman.107.1717985138.2909.python-list@python.org>
References: <v456ak$3pmpo$1@dont-email.me>
 <010f01dabada$ad867d00$08937700$@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de mqHnzKtFIV5Te+ae2xqZ8APO34ixwweW4RzC4Ihcdpvg==
Cancel-Lock: sha1:qePuBp5f9C+htI6nAfW/+zv/uKo= sha256:iCeU3fuRtLXH7FKPP+wopceasl9LQ1Vs2V+4NnQgq8w=
Return-Path: <avi.e.gross@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=gmail.com header.i=@gmail.com header.b=eKxjE2OI;
 dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.082
X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'python?': 0.03;
 'received:108': 0.09; 'subject:Python': 0.12; 'url:mailman': 0.15;
 '(b)': 0.16; '(bar': 0.16; '2024': 0.16; 'probably': 0.17;
 'message-id:@gmail.com': 0.18; 'to:addr:python-list': 0.20;
 'language': 0.21; 'skip:_ 10': 0.22; 'code': 0.23; 'past': 0.25;
 'skip:- 10': 0.25; 'url-ip:188.166.95.178/32': 0.25; 'url-
 ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'url-
 ip:188.166/16': 0.25; 'perform': 0.26; 'attempt': 0.31; 'url-
 ip:188/8': 0.31; 'python-list': 0.32; 'header:In-Reply-To:1':
 0.34; 'received:google.com': 0.34; 'bar': 0.35;
 'from:addr:gmail.com': 0.35; 'hard': 0.37; 'on.': 0.39; 'explain':
 0.40; 'from:': 0.62; 'to:': 0.62; 'showing': 0.62; 'came': 0.65;
 'back': 0.67; 'deal': 0.73; 'june': 0.73; 'life': 0.77; 'reply':
 0.77; 'sent:': 0.78; '==>': 0.84; 'bounced': 0.84; 'shoot': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1717985136; x=1718589936; darn=python.org;
 h=content-language:thread-index:content-transfer-encoding
 :mime-version:message-id:date:subject:in-reply-to:references:to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=eIBnteW+RVkVVVLSTxKgNNAPVAo6ZORZjfrOXlJDxAY=;
 b=eKxjE2OILTDR735uSJZGCC5LUJQVWW+vHuHjA7Mr9BlF+z0A2mN+gy2H/wB8Ovboly
 zgZ0bJCukGBqFMjR3ura+edz7fu3LBtYXCz3pwr3s21owPjW5714vc3PCFcZgFqHfZs/
 eGBCN4FrXZyHwnz6GllPgXFy6oatnGw5tyW/vq7BfFCBEoOy+Rqmn7yZy63z11EERMAW
 WgwX5kTnwC10ittVHLAFGN2WIwbhxMUg/9Ai9NSVpNqee5o5PWQTufTOGVhegRiPbVL1
 WTKF4PneRBVaxuK81h2mOPwhfFqBJ4QesOUV6njwAWu2Kt971QGgRlVaK26oQeSkssHU
 UQnQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1717985136; x=1718589936;
 h=content-language:thread-index:content-transfer-encoding
 :mime-version:message-id:date:subject:in-reply-to:references:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=eIBnteW+RVkVVVLSTxKgNNAPVAo6ZORZjfrOXlJDxAY=;
 b=T8io2Filf3JZSijiZhfdsYbDSXQ1xlAFK+xTxPM+pZocL7ESWcbgyLpJmp/vIem81n
 4UbVnFxqj5xFItAkBBc02zlmbFLaXnfve1uxrKFGYp/AYYHopvVYmeJrUq/jgJNnvth7
 jGvvA75wO6IkYeEjBvlbjtDK2xAAXGRXPQA7A5B8z/5IMYpZkr0Ox4rAQg8BwFSTniwT
 SLSA0IYz7O/hM//gWUKYchwHsm3ZxI58/vuUNrLetyItW0snkLKxpFLTiFFIBhjRZ1PV
 9VCIb74aeVY3Y+bNvcE1KOD82rwnVpuNY43FsxXfv3zL7XrGTcK4N2epmnpHddPJEfI9
 Cm/Q==
X-Gm-Message-State: AOJu0Yxvi+VSojkxH3M6R9JnE/Nv7qK3oOBz+KUayYDV6O12r4Kskq2D
 epd0CrWTG1Z5sxkzyULdxi79udNCB5yqXaRmteNg9xTvTnd98KZ57Tb9Sw==
X-Google-Smtp-Source: AGHT+IGQDtCJs+9PLS1t9f7jtD80TnihsH3sprj6TdOZQ1GIsVeEotYGP4kFAfNGZrxkrt8mYAxOag==
X-Received: by 2002:a05:6808:f87:b0:3d2:1f71:1901 with SMTP id
 5614622812f47-3d21f711a37mr5131651b6e.29.1717985135570; 
 Sun, 09 Jun 2024 19:05:35 -0700 (PDT)
In-Reply-To: <v456ak$3pmpo$1@dont-email.me>
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQJ/EDHgwv9+Eyp+weNGVMwGCTVh87B3lCAQ
Content-Language: en-us
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
 <python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
 <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
 <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <010f01dabada$ad867d00$08937700$@gmail.com>
X-Mailman-Original-References: <v456ak$3pmpo$1@dont-email.me>
Bytes: 6018

I remembered that HenHanna had been hard to deal with in the past and when
my reply to him/her/them bounced as a bad/fake address it came back to me
that I am better off not participating in this latest attempt to get us to
perform then probably shoot whatever we say down.

A considerate person would ask questions more clearly and perhaps explain
what language they are showing us code from and so on.

Life is too short to waste.

-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=gmail.com@python.org> On
Behalf Of HenHanna via Python-list
Sent: Sunday, June 9, 2024 5:20 PM
To: python-list@python.org
Subject: in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))


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))
-- 
https://mail.python.org/mailman/listinfo/python-list