Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the string method that begins with is in python?

Shulou Source: shulou.com Published: 2022-06-03 17:34:26 11月13日 Update

This article mainly introduces what python has at the beginning of is string method, the article is very detailed, has a certain reference value, interested friends must read it!

Description

1. Isspace determines whether the specified string consists entirely of white space characters.

2. Isalpha determines whether the specified string is composed entirely of letters.

3 、 isdecimal .

Determines whether the specified string consists entirely of decimal numbers.

4 、 Isnumeric .

Determines whether the specified string consists entirely of numbers.

5 、 Isalnum .

Determines whether the specified string consists entirely of letters and numbers.

Example

Print ('t\ r\ n'.isspace ()) # Trueprint ('abc'.isalpha ()) # Trueprint (' abc1'.isalpha ()) # False print ('123'.isdecimal ()) # Trueprint (' 123 six Ⅵ'. Isdecimal ()) # False print ('123 six Ⅵ'. Isnumeric ()) # Trueprint ('123 six Ⅵ a'.isnumeric ()) # False print (' abc123 six Ⅵ' .isalnum () # Trueprint ('abc123six Ⅵ!'. Isalnum ()) # False is all the content of the article "what is the string method that python starts with is"? Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Characters strings numbers beginnings methods content letters articles values interests decimal examples guys buddies more knowledge blanks industry information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information macOS MySQL Apple OPPO Reno