Str.isdigit returns True if all the element in string are digits otherwise returns False.

Difference between is digit and is decimal is that all decimals are digits but all digits are not decimals.

As shown below str.isdigit function returns True if for unicode characters also but str is decimal returns false.

str.isdigit
Str.isdigit

 

By SC

One thought on “Str.isdigit”

Leave a Reply

Your email address will not be published. Required fields are marked *