Python Forum

Full Version: to strings or to bytes, that is the question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when i convert control character representation to what it represents, should a function that does this return a string or return bytes (in python3)?

convertcc('^'+'M'+'\\'+'n') -> '\r\n'
vs
convertcc('^'+'M'+'\\'+'n') -> b'\r\n'
?