Skip to content

Commit bbe12a7

Browse files
committed
[Doc] Added snippet code to str.islower method
1 parent 23c488d commit bbe12a7

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Doc/library/stdtypes.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2289,6 +2289,20 @@ expression support in the :mod:`re` module).
22892289
Return ``True`` if all cased characters [4]_ in the string are lowercase and
22902290
there is at least one cased character, ``False`` otherwise.
22912291

2292+
For example::
2293+
2294+
>>> 'BANANA'.islower()
2295+
False
2296+
>>> 'banana'.islower()
2297+
True
2298+
>>> 'baNana'.islower()
2299+
False
2300+
>>> ' '.islower()
2301+
False
2302+
>>> ''.islower()
2303+
False
2304+
2305+
See also :meth:`isupper`.
22922306

22932307
.. method:: str.isnumeric()
22942308

@@ -2385,8 +2399,10 @@ expression support in the :mod:`re` module).
23852399
False
23862400
>>> ' '.isupper()
23872401
False
2402+
>>> ''.isupper()
2403+
False
23882404

2389-
2405+
See also :meth:`islower`.
23902406

23912407
.. _meth-str-join:
23922408

0 commit comments

Comments
 (0)