Printing characters outside of the ASCII range

Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de
Sun Nov 11 09:40:18 EST 2012


Am 09.11.2012 18:17 schrieb danielk:

> I'm using this character as a delimiter in my application.

Then you probably use the *byte* 254 as opposed to the *character* 254.

So it might be better to either switch to byte strings, or output the 
representation of the string instead of itself.

So do print(repr(chr(254))) or, for byte strings, print(bytes([254])).


Thomas



More information about the Python-list mailing list