0

How to print reverse binary pattern in python?

Language : Python

29th Dec 2019, 7:09 PM
Pratiksha Sanjay Vikhe
Pratiksha Sanjay Vikhe - avatar
3 odpowiedzi
+ 4
Can you give us a sample how this should look like?
29th Dec 2019, 7:11 PM
Lothar
Lothar - avatar
+ 2
myint = bin(34) print("Normal binary", myint) print("Leading 0b removed", myint[2:]) print("Leading 0b removed and reversed", myint[2:][::-1])
29th Dec 2019, 10:53 PM
rodwynnejones
rodwynnejones - avatar