Boolean String Methods
Following methods in str class return True or False.
| Sr.No. | Methods & Description |
|---|---|
1 |
Returns true if string has at least 1 character and all characters are alphanumeric and false otherwise. |
2 |
Returns true if string has at least 1 character and all characters are alphabetic and false otherwise. |
3 |
Returns true if the string contains only digits and false otherwise. |
4 |
Returns true if string has at least 1 cased character and all cased characters are in lowercase and false otherwise. |
5 |
Returns true if a unicode string contains only numeric characters and false otherwise. |
6 |
Returns true if string contains only whitespace characters and false otherwise. |
7 |
Returns true if string is properly "titlecased" and false otherwise. |
8 |
Returns true if string has at least one cased character and all cased characters are in uppercase and false otherwise. |
9 |
Returns True is all the characters in the string are from the ASCII character set |
10 |
Checks if all the characters are decimal characters |
11 |
Checks whether the string is a valid Python identifier |
12 |
Checks whether all the characters in the string are printable |