提供一个参考链接《isalpha() Method


  使用isdigit()判断是否是全数字:

     if  word.encode( 'UTF-8' ).isdigit()


  使用isalpha()判断是否是全英文:

    if  word.encode( 'UTF-8' ).isalpha()


  判断是否属于某个List:

    if  word  in [ 'a', '。'  ]

 

相关文章:

  • 2021-06-24
  • 2022-12-23
  • 2021-11-08
  • 2021-12-14
  • 2021-08-26
  • 2021-12-13
  • 2022-12-23
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案