Python isdigit()方法

Python 字符串 Python 字符串

描述

Python isdigit() 方法检测字符串是否只由数字组成。

语法

isdigit()方法语法:


str.isdigit()

参数

  • 无。