Python Forum

Full Version: is this Unicode printable?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
given a Unicode character (a str of len() == 1 or maybe an int that can be used with chr()) how can the code determine if it is printable? how small could a pythonic is_printable(ch) be?
It's built-in Big Grin
test = chr (7)

print (test.isprintable ())
ah, i tried that the wrong way and misconcluded that it was not there. thanks!