What is the output of print(b'hi'.decode()) in Python?
print(b'hi'.decode())
Correct answer
B. hi
B. hi
bytes.decode converts bytes to a str.
Asked in: Python Interview Standard Library
https://docs.python.org/3/library/index.htmlNot sure why the answer is B? Ask here and get an explanation.