What is the output of print(bin(5)) in Python?
print(bin(5))
Correct answer
B. 0b101
B. 0b101
bin() returns the binary representation of an integer as a string with a 0b prefix.
Asked in: Python Interview Data Types
https://docs.python.org/3/library/stdtypes.htmlNot sure why the answer is B? Ask here and get an explanation.