Nandish <lbnand...@gmail.com> added the comment: I took print(100>>3), I dropped last 3 bits and added value ‘0’ to first 3 bits. Both manual calculation and python result was correct.
How can << shit operator and >> shit operator work differently , with different logic ? Thanks Nandish On Wed, Dec 23, 2020 at 12:54 AM Eric V. Smith <rep...@bugs.python.org> wrote: > > Eric V. Smith <e...@trueblade.com> added the comment: > > Why do you think the first 3 bits should be dropped? That's not the > documented behavior of <<. > > ---------- > nosy: +eric.smith > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue42720> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42720> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com