May-07-2020, 01:52 PM
To get the result that you are expecting, you would use bitwise operators.
a = 6 b = 7 print(a & b) #& is bitwise and
Python logical operator AND
|
|
Messages In This Thread |
Python logical operator AND - by rasec70 - May-07-2020, 08:51 AM
RE: Python logical operator AND - by buran - May-07-2020, 08:58 AM
RE: Python logical operator AND - by pyzyx3qwerty - May-07-2020, 09:21 AM
RE: Python logical operator AND - by TomToad - May-07-2020, 01:52 PM
RE: Python logical operator AND - by pyzyx3qwerty - May-07-2020, 03:40 PM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Help with Logical error processing List of strings | dmc8300 | 3 | 1,228 |
Nov-27-2022, 04:10 PM Last Post: Larz60+ |
|
Greedy algorithms on logical problems | Opensourcehacker | 0 | 1,631 |
Nov-22-2020, 05:12 PM Last Post: Opensourcehacker |
|
Python greater than equal to comparison operator | Ilangos | 4 | 2,593 |
Sep-26-2020, 03:53 AM Last Post: buran |
|
Unable to bit shift and logical OR bytes and ints? | MysticLord | 7 | 7,451 |
Sep-01-2020, 03:31 PM Last Post: deanhystad |
|
Basic logical errors | cpopescu | 3 | 2,227 |
Jun-03-2020, 11:30 AM Last Post: menator01 |
|
Use of & operator, groupby in python | abhi1693r | 0 | 1,667 |
Mar-11-2020, 02:25 PM Last Post: abhi1693r |
|
Comparison Operator "is" idle vs python command | spisatus | 3 | 2,931 |
Oct-29-2019, 10:00 PM Last Post: DeaD_EyE |
|
parsing logical expression with pyparsing | palo173 | 2 | 5,691 |
May-13-2019, 09:22 AM Last Post: palo173 |
|
Is there any <> operator in python 3.6 | rajeev1729 | 1 | 3,224 |
Sep-11-2017, 07:46 AM Last Post: Mekire |