128. String Isprintable and Isspace Method in Python with Example Code || Python String Methods-10

Published: 02 October 2022
on channel: Bhavatavi
11
0

Code:
s='Space is printable'
print(s)
print(s.isprintable())

s='\n New line is printable'
print(s)
print(s.isprintable())

s=''
print('\n Empty string is priontable?',s.isprintable())

s=chr(27)+chr(97)
if s.isprintable()==True:
print('Printable')
else:
print('not printable')

s='2+2=4'
if s.isprintable()==True:
print("Printable")
else:
print('not printable')
#issspace()

s=' \t'
print(s.isspace())
s=' a '
print(s.isspace())
s=''
print(s.isspace())

s='\t \n'
if s.isspace()==True:
print("All whitespace characters")
else:
print("contains non-whitespace characters")

s='2+2=4'
if s.isspace()== True:
print("All whitespace characters")
else:
print("contains non-whitespace characters")

str=' '
print(str.isspace())
str='helloworld'
print(str.isspace())


On this page of the site you can watch the video online 128. String Isprintable and Isspace Method in Python with Example Code || Python String Methods-10 with a duration of hours minute second in good quality, which was uploaded by the user Bhavatavi 02 October 2022, share the link with friends and acquaintances, this video has already been watched 11 times on youtube and it was liked by 0 viewers. Enjoy your viewing!