DEV Community

Cover image for Can anyone explain!
Jahil tweets🥀🖤
Jahil tweets🥀🖤

Posted on

Can anyone explain!

Can anyone explain me why we use this 2 in the code and if i change this 2 with anything else i get an error what is that??

Top comments (1)

Collapse
 
michaelfiber profile image
michaelfiber

The 0b prefix indicates that its a binary number. The int() command expects the second parameter to be the base of the number in the string. The base for a binary number is 2.