Python String isspace() MethodPython isspace() method is used to check space in the string. It returna true if there are only whitespace characters in the string. Otherwise it returns false. Space, newline, and tabs etc are known as whitespace characters and are defined in the Unicode character database as Other or Separator. SignatureParametersNo parameter is required. ReturnIt returns either True or False. Let's see some examples of isspace() method to understand it's functionalities. Python String isspace() Method Example 1Output: True Python String isspace() Method Example 2Output: False Python String isspace() Method Example 3isspace() method returns true for all whitespaces like:
Output: It contains space Not space It contains space
Next TopicPython Strings
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week