代码示例:(标识:python_ref_string_isdigit_1)
python_ref_string_isdigit_1.py
txt = "20491001"

x = txt.isdigit()

print(x)
运行结果: