import re

# 判断是否包含英文
str = "text文本"
contain_en = bool(re.search('[a-z]', str))

if contain_en:
    print("包含英文字符")
else:
    print("不包含英文字符")

 

相关文章:

  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-31
  • 2022-12-23
  • 2021-11-21
  • 2022-01-17
  • 2022-12-23
相关资源
相似解决方案