Python islower

Python islower 函数用于检查给定字符串是否至少包含一个字符,以及该字符是否为小写。如果字符是小写,则返回 True。否则,返回 False。

在本节中,我将向您展示如何通过一个示例来编写字符串 islower 函数,其语法如下所示。

String_Value.islower()
  • 字符串值:请选择一个有效的字面量。

Python islower 字符串函数示例

以下示例集有助于您理解 islower 函数。请参考 Python 中的 字符串 及其 方法 文章以理解它们。

Str1 = 'tutorial gateway';
print('First Output  = ', Str1.islower())

# Performing on Empty Space
Str2 = '     ';
print('Second Output For Empty Space is = ', Str2.islower())

# Performing directly on Alphabets
Str3 = 'python tutorial at Tutorial Gateway'.islower()
print('Third Output = ', Str3)

# Performing on both Digits and Alphabets
Str4 = '1239abcd'.islower()
print('Fourth Output  = ', Str4)

# Performing on Special Characters
Str5 = '!!!@@@'.islower()
print('Fifth Output  = ', Str5)

# Performing on Both Alphabets & Special Characters
Str6 = 'abc!!!@@@'.islower()
print('Sixth Output  = ', Str6)
string islower function Example