❮ Previous Next ❯

What is & = in Python?

‘&’ is bitwise AND operator
‘=’ is the assignment operator.
let x=5
y=3
z=x & y
print(z)
Output: 1
Here input value 5 and 3 is converting into bits(0 and 1)
5——0000 0101
3——0000 0011
now we performed AND operation, we got 0000 0001 that is 1
‘=’ operator means assigning a value to a variable. Example;
number=100 that means the value 100 assigned to a variable number



❮ Previous Next ❯

Follow Us




  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved