Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created June 29, 2020 01:39
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/3263680a68d2d37b76192cdd9e498367 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/3263680a68d2d37b76192cdd9e498367 to your computer and use it in GitHub Desktop.
#space is there,so returns False
s1="example of strings"
print (s1.isalpha()) #Output:False
#empty string,so returns False
s2=''
print (s2.isalpha())#Output:False
#contains only alphabets, returns True
s3="apple"
print (s3.isalpha())#Output:True
#contains special characters,so returns False
s4="#$%"
print (s4.isalpha())#Output:False
#contains numbers and alphabets,returns False
s5="123abc"
print (s5.isalpha())#Output:False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment