Removing control characters from a string in python,return ''.join(ch for ch in s if unicodedata.category(ch)[0] != 'C')