Describe isdecimal( ) with example.
Answers
Answered by
1
Answer:
Decimal is a term that describes the base-10 number system, probably the most commonly used number system. The decimal number system consists of ten single- digit numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The number after 9 is 10. The number after 19 is 20 and so forth.
plzz mark as brainlist
Answered by
0
The isdecimal( ) method
Explanation:
Python string method isdecimal() inspects whether the string comprises only decimal characters. This method is present only on Unicode objects.
- Syntax - string.isdecimal()
- Parameters - This doesn't require any parameters.
- Return Value - This method returns true if all characters in the string are decimal, otherwise false.
The code snippet of isdecimal() method.
s = "28212"
print(str.isdecimal())
True
# contains alphabets
s = "32ladk3"
print(str.isdecimal())
False
Similar questions
Math,
5 months ago
English,
5 months ago
English,
11 months ago
History,
11 months ago
Computer Science,
1 year ago