1 二者都无法直接判断字符串中的负数,

# 都无法判断字符串中的负数
c = '-55'
print(c.isdigit())
print(c.isnumeric())
# isnumeric()的不同之处是可以判断汉字的数字
d = '四十五八'
print(d.isnumeric())
View Code

相关文章:

  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
猜你喜欢
  • 2021-09-09
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案