How to know if the characters in a python string is printable?