Python String isdigit() method

The string.isdigit() method returns a boolean value true if all characters in the string are digits else for any other value it returns false.

Syntax

Parameter

NA

Return

This method returns a Boolean value true if all characters in the string are digits else for even one non-digit character it returns False.

Example 1

Output

Example 2

Output

Example 3

Output

Pin It on Pinterest

Share This