Deutsch English Français Italiano |
<tntsva$ubhe$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Dominique <zzz@aol.com> Newsgroups: fr.rec.jeux.enigmes Subject: Re: [Solution] F-Nim Date: Wed, 21 Dec 2022 04:02:02 +0100 Organization: A noiseless patient Spider Lines: 28 Message-ID: <tntsva$ubhe$1@dont-email.me> References: <titnme$31k8$1@cabale.usenet-fr.net> <tj0564$tm9$1@cabale.usenet-fr.net> <tk2qvq$vs$1@gioia.aioe.org> <tk63c3$1a60$1@cabale.usenet-fr.net> <tk649a$1aau$1@cabale.usenet-fr.net> <tk7v6u$gpc$1@gioia.aioe.org> <tk88h7$1p3g$1@cabale.usenet-fr.net> <tk8a0g$10jk$1@gioia.aioe.org> <tk8g0n$1qhp$1@cabale.usenet-fr.net> <tk9dbo$tgd$1@gioia.aioe.org> <tkai4r$28kf$1@cabale.usenet-fr.net> <tlttkn$8qe$1@cabale.usenet-fr.net> <tlv4cg$1643$1@gioia.aioe.org> <tm3abs$1nfg$1@cabale.usenet-fr.net> <tm4air$1mat$1@gioia.aioe.org> <tm4p8b$69j$1@shakotay.alphanet.ch> <tm50lo$1nr9$1@gioia.aioe.org> <tm65o3$ncu$1@shakotay.alphanet.ch> <tm79il$ljb$1@gioia.aioe.org> <tnq4h8$4s3$1@cabale.usenet-fr.net> <tnriqv$k4qj$1@dont-email.me> <tnrlue$1c9k$1@gioia.aioe.org> <tnrml5$kgiv$1@dont-email.me> <tnt8ln$1o4c$1@cabale.usenet-fr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 21 Dec 2022 03:02:02 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="51363c83a0b682e898eede77d5881ff6"; logging-data="994862"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+6TbzbC6ybASadU0cuUADC4L2vdGCaCs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Cancel-Lock: sha1:0a2zFiSK3IeauKc2doBeT19REGA= In-Reply-To: <tnt8ln$1o4c$1@cabale.usenet-fr.net> Content-Language: fr Bytes: 2442 Le 20/12/2022 à 22:15, Olivier Miakinen a écrit : > Le 20/12/2022 08:01, Dominique répondait à Jacques Mathon : >>>> ... >>>>> s = "s" if (have > 1) else "" >> >> Merci Jacques, je n'aurais jamais pensé à cette façon d'écrire une >> condition. Python est un langage vraiment très souple. > > Je me trompe peut-être, mais je crois que cette syntaxe vient du > langage Perl. > Pourtant, cette écriture fonctionne très bien en Python : have=2 s = "s" if (have > 1) else "" s Out[106]: 's' have=0 s = "s" if (have > 1) else "" s Out[109]: '' -- Dominique Esto quod es