summaryrefslogtreecommitdiffstats
path: root/Doc/library/stdtypes.rst
diff options
context:
space:
mode:
authorKishore Vancheeshwaran <24776049+kishvanchee@users.noreply.github.com>2019-09-13 09:20:01 (GMT)
committerStéphane Wirtel <stephane@wirtel.be>2019-09-13 09:20:01 (GMT)
commit7183064e9e2a1b19f2ff469a65a34e7094483881 (patch)
treeadd5eab4e1d28d3189dc0eb5ef65a7f52c00f66e /Doc/library/stdtypes.rst
parent7cad53e6b084435a220e6604010f1fa5778bd0b1 (diff)
downloadcpython-7183064e9e2a1b19f2ff469a65a34e7094483881.zip
cpython-7183064e9e2a1b19f2ff469a65a34e7094483881.tar.gz
cpython-7183064e9e2a1b19f2ff469a65a34e7094483881.tar.bz2
Doc: Add example snippet for str.isupper() (GH-14681)
Diffstat (limited to 'Doc/library/stdtypes.rst')
-rw-r--r--Doc/library/stdtypes.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 426d768..a21c553 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1782,6 +1782,16 @@ expression support in the :mod:`re` module).
Return true if all cased characters [4]_ in the string are uppercase and
there is at least one cased character, false otherwise.
+ >>> 'BANANA'.isupper()
+ True
+ >>> 'banana'.isupper()
+ False
+ >>> 'baNana'.isupper()
+ False
+ >>> ' '.isupper()
+ False
+
+
.. method:: str.join(iterable)