Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > fr.comp.lang.python > #3726
| Path | csiph.com!pasdenom.info!news.izac.org!reader |
|---|---|
| From | Benoit Izac <use.reply.to@INVALID.ADDRESS> |
| Newsgroups | fr.comp.lang.python |
| Subject | Re: séparer une combinaison d'une liste |
| Date | Wed, 02 Feb 2022 07:53:34 +0100 |
| Message-ID | <87o83pbvyp.fsf@izac.org> (permalink) |
| References | <r6udnXOczOGPLmT8nZ2dnUU7_83NnZ2d@giganews.com> |
| Reply-To | benoit.izac@free.fr |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | keg.izac.org; logging-data="1537003"; mail-complaints-to="usenet@izac.org" |
| Xref | csiph.com fr.comp.lang.python:3726 |
Show key headers only | View raw
Bonjour,
Le 01/02/2022 à 23:24, carlit a écrit dans le message
<r6udnXOczOGPLmT8nZ2dnUU7_83NnZ2d@giganews.com> :
> J'essaye de séparer des éléments combinés d'une liste :
>
> je veux passer de [('1', '2')] a ['1', '2']
>
> Si quelqu'un a une solution je suis preneur
>>> l = [('1', '2')]
>>> [y for x in l for y in x]
['1', '2']
--
Benoit Izac
Back to fr.comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
s�parer une combinaison d'une liste carlit <nospam_alex.roche637@gmail.com.invalid> - 2022-02-01 16:24 -0600
Re: séparer une combinaison d'une liste Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2022-02-02 07:53 +0100
Re: séparer une combinaison d'une liste Dominique <zzz@aol.com.invalid> - 2022-02-02 12:05 +0100
Re: séparer une combinaison d'une liste hum@bof.org - 2022-02-02 12:32 +0100
Re: s�parer une combinaison d'une liste carlit <nospam_alex.roche637@gmail.com.invalid> - 2022-02-02 05:48 -0600
Re: s�parer une combinaison d'une liste carlit <nospam_alex.roche637@gmail.com.invalid> - 2022-02-02 05:46 -0600
Re: séparer une combinaison d'une liste Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2022-02-02 14:46 +0100
csiph-web