3 ответов
+ 2
If you use the function bin on a number, a string is returned that represents the binary literal.
And since it's a string, you can just slice it like any iterable and take out exactly the part you want.
See here:
https://code.sololearn.com/co2yThgC1yQA/?ref=app
+ 1
print(bin(int(input()))[2:])
no?
0
Hey it's not that