isspace()

my_str.isspace()
Returns True if all chars in a string are whtespace , otherwise rturns False
my_str='Welcome to plus2net'
print(my_str.isspace())      # Output is False 

my_str='  '
print(my_str.isspace())      # Output is True

my_str=' \n '
print(my_str.isspace())      # Output is True ( presence of line break \n)

my_str='  \t '              
print(my_str.isspace())      # Output is True ( presence of tab \t )

my_str=' com '
print(my_str.isspace())      # Output is False ( presence of string )


All String methods



plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer