#P1790. 实现 digit 函数
实现 digit 函数
题目描述
实现Python中的 is_digit(s) 函数,is_digit 的作用是给一个字符串s,如果只包含数字,则返回True,否则返回False
本题需要递交的内容
- is_digit 以及相关函数
- 以下 2 行代码
s = input()
print(is_digit(s))
123
True
gua
False
实现Python中的 is_digit(s) 函数,is_digit 的作用是给一个字符串s,如果只包含数字,则返回True,否则返回False
s = input()
print(is_digit(s))
123
True
gua
False