[python] 判断字符串是否是全英文的

str = 'She's'.replace("\'","")
str.encode('utf-8').isalpha()
# False

猜你喜欢

转载自blog.csdn.net/Trance95/article/details/129827487