Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.lang.python > #3620

Re: 20^5 donne 17 ?

Path csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!aioe.org!ha3v19R6VSURQSO4Q7UHNg.user.46.165.242.91.POSTED!not-for-mail
From Dominique <zzz@aol.com.invalid>
Newsgroups fr.comp.lang.python
Subject Re: 20^5 donne 17 ?
Date Tue, 2 Nov 2021 08:08:14 +0100
Organization Aioe.org NNTP Server
Message-ID <slqo4u$cs9$1@gioia.aioe.org> (permalink)
References <slqd8j$15am$1@gioia.aioe.org> <87r1bzumpd.fsf@izac.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Info gioia.aioe.org; logging-data="13193"; posting-host="ha3v19R6VSURQSO4Q7UHNg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1
X-Notice Filtered by postfilter v. 0.9.2
Content-Language fr
Xref csiph.com fr.comp.lang.python:3620

Show key headers only | View raw


Le 02/11/2021 à 06:54, Benoit Izac a écrit :

> C'est l'opérateur binaire « ou exclusif ».
> 
> <https://docs.python.org/fr/3/library/stdtypes.html#bitwise-operations-on-integer-types>
> 
>>>> f'{20:05b}'
> '10100'
>>>> f'{5:05b}'
> '00101'
>>>> f'{17:05b}'
> '10001'
> 

Ah OK, merci. Pas sûr que ça me serve au quotidien :-)

-- 
Dominique
Courriel : dominique point sextant ate orange en France
Esto quod es

Back to fr.comp.lang.python | Previous | NextPrevious in thread | Find similar


Thread

20^5 donne 17 ? Dominique <zzz@aol.com.invalid> - 2021-11-02 05:02 +0100
  Re: 20^5 donne 17 ? Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2021-11-02 06:54 +0100
    Re: 20^5 donne 17 ? Dominique <zzz@aol.com.invalid> - 2021-11-02 08:08 +0100

csiph-web