-2

I want to convert 2 as 10 . but bin() function gives like 0b10. How can I do it?

1 Answers1

0

Remove the prefix using -> bin(2)[2:]

UserASR
  • 1,675
  • 3
  • 19
  • 41