Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )

Liste des GroupesRevenir à cl python 
Sujet : Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )
De : hjp-python (at) *nospam* hjp.at (Peter J. Holzer)
Groupes : comp.lang.python
Date : 18. Jun 2024, 22:26:50
Autres entêtes
Message-ID : <mailman.155.1718748012.2909.python-list@python.org>
References : 1 2 3 4 5
Pièces jointes : signature.asc (application/pgp-signature)
On 2024-06-14 06:10:06 -0000, candycanearter07 via Python-list wrote:
Phil Carmody <pc+usenet@asdf.org> wrote at 12:01 this Thursday (GMT):
I'd say you can't beat the verbosity, or lack thereof of just plain zsh/bash:
  $ echo {1,2,3,4}0{1,2,3}
  101 102 103 201 202 203 301 302 303 401 402 403
 
 
I /think/ you can replace it with {1...4} and {1...3}? I know there is
some syntax for "range of numbers" but I can't remember it exactly.

Only two dots, not three:

% echo {1..4}0{1..3}
101 102 103 201 202 203 301 302 303 401 402 403

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"


Date Sujet#  Auteur
10 Jun 24 * in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )8HenHanna
10 Jun 24 `* Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )7Paul Rubin
13 Jun 24  `* Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )6Phil Carmody
14 Jun 24   `* Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )5candycanearter07
14 Jun 24    +- Re: in Python: (101 102 103 201 ...) (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
18 Jun 24    +- Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )1Peter J. Holzer
20 Jun 24    `* Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )2Phil Carmody
21 Jun 24     `- Re: in Python: (101 102 103 201 202 203 301 302 303 401 402 403 )1candycanearter07

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal