Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

is alpha python

 is alpha:

  • In python "is alpha" is the method used to check the alphabets whether they are present in the given string or substring.
  • In isalpha, it must carry only alphabets.
  • It carries the result in the boolean type
  • If the string contains all alphabets then it returns true, else false.
  • The isalpha is not applicable for the alphanumeric.
  • It is the built-in function of python.
syntax: str.isalpha()

Example:  s="abcdefg"
                   str.isalpha(s)
                    true

#write a python program to demonstrate is alpha function.

  1. a="india"
  2. b="india123"
  3. a=str.isalpha(a)
  4. b=str.isalpha(b)
  5. print(a)
  6. print(b)
output: true
             false




This post first appeared on Java Tutorial - InstanceOfJava, please read the originial post: here

Share the post

is alpha python

×

Subscribe to Java Tutorial - Instanceofjava

Get updates delivered right to your inbox!

Thank you for your subscription

×