Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created June 29, 2020 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndhumathyChelliah/30e764a0699790db3708caa841737e15 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/30e764a0699790db3708caa841737e15 to your computer and use it in GitHub Desktop.
s1="Hello123"
print (s1.isprintable())#Output:True
s2="Hello123$#"
print (s2.isprintable())#Output:True
s3="Hello 123"
print (s3.isprintable())#Output:True
#Newline character,tab space are not printable character
s4="Hello\n\t"
print (s4.isprintable())#Output:False
#Vertical tab,feed , carriage return are not prinatable characters.
s5="\v\f\r"
print (s5.isprintable())#Output:False
#empty string
s6=''
print (s6.isprintable())#Output:True
#whitespace
s7=' '
print (s7.isprintable())#Output:True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment