Skip to content

Commit 7183064

Browse files
kishvancheematrixise
authored andcommitted
Doc: Add example snippet for str.isupper() (pythonGH-14681)
1 parent 7cad53e commit 7183064

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/library/stdtypes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,16 @@ expression support in the :mod:`re` module).
17821782
Return true if all cased characters [4]_ in the string are uppercase and
17831783
there is at least one cased character, false otherwise.
17841784

1785+
>>> 'BANANA'.isupper()
1786+
True
1787+
>>> 'banana'.isupper()
1788+
False
1789+
>>> 'baNana'.isupper()
1790+
False
1791+
>>> ' '.isupper()
1792+
False
1793+
1794+
17851795

17861796
.. method:: str.join(iterable)
17871797

0 commit comments

Comments
 (0)