Deutsch   English   Français   Italiano  
<vikju4$3de5c$1@dont-email.me>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Dominique <dominique.sextant@orange.fr.invalid>
Newsgroups: fr.comp.lang.python
Subject: =?UTF-8?Q?Re=3A_Panne_de_m=C3=A9moire_avec_list_et_str?=
Date: Mon, 2 Dec 2024 16:32:20 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <vikju4$3de5c$1@dont-email.me>
References: <vik35m$393an$1@dont-email.me> <pfku1pxUSo1PjY00UnMRmj9UrQo@jntp>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 02 Dec 2024 16:32:21 +0100 (CET)
Injection-Info: dont-email.me; posting-host="727972b966e97283085c8e830fc7ae79";
	logging-data="3586220"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19jkycSsLwqnRwXLuUb6KAfEiWCJftPZ3k="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:OEbwAlyDRyJ/G9c/zZoq9D3VtPU=
In-Reply-To: <pfku1pxUSo1PjY00UnMRmj9UrQo@jntp>
Content-Language: fr
Bytes: 1519

Le 02/12/2024 à 12:16, Python a écrit :

>>>> l = [['2'], ['2'], ['6'], ['8'], ['9']]
>>>> ''.join(x for x, in l)
> '22689'
> 

Je te remercie pour cette réponse qui allie simplicité et élégance. Je 
me pose toute fois une question : pour quoi la virgule après le X du for de

res=''.join(x for x, in result)

Et si je le supprime, j'ai cette erreur :

sequence item 0: expected str instance, list found

-- 
Dominique
Esto quod es