Python

Python Menu

Python

Python String isspace() - Definition, Syntax, Parameters, Examples

Definition

The isspace() method returns True if all the characters in a string are whitespaces, otherwise False.

Syntax

string.isspace()

Parameters

No Parameters.

Examples:

testStr = " " result = testStr.isspace() print(result) # another example testStr = "Welcome to the Python tutorials" result = testStr.isspace() print(result)

Introduction

Python Basics

Python Advance

Data Science Python Tutorials

Python Functions and Methods