我想检查一个字符串是否是ASCII格式.
我知道ord(),但是当我尝试时ord('é'),我有TypeError: ord() expected a character, but string of length 2 found.我知道它是由我构建Python的方式引起的(如ord()文档中所述).
ord()
ord('é')
TypeError: ord() expected a character, but string of length 2 found
还有其他方法可以检查吗?
python string unicode ascii
ascii ×1
python ×1
string ×1
unicode ×1