-3

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

Hamed
  • 5,867
  • 4
  • 32
  • 56

1 Answers1

0

Remove the prefix with:

bin(2)[2:]
Chris
  • 26,361
  • 5
  • 21
  • 42
UserASR
  • 2,015
  • 4
  • 24
  • 47