Advertisement
# Signature of isalpha() method
isalpha()
# Python - An example of isalpha() method
# Creating the first string
s3 = ('QuackQuack')
# Printing the third string
print('The third string : ', s3)
# Calling the isalpha() method on third string object
print('isalpha() method on third string : ', s3.isalpha())
# Creating the second string
s2 = ('Woof Woof')
# Printing the second string
print('The second string : ', s2)
# Calling the isalpha() method on second string object
print('isalpha() method on second string : ', s2.isalpha())
The first string : QuackQuack
isalpha() method on first string : False
The second string : Woof Woof
isalpha() method on second string : False
Advertisement
# Python - Method isalpha() Example
# Creating the first string
s1 = ('I love Donald Duck cartoons')
# Printing the first string
print('The first string : ', s1)
# Calling the isalpha() method on first string object
print('isalpha() method on first string : ', s1.isalpha())
# Creating the second string
s2 = ('The_Seven_Chakras')
# Printing the second string
print('The second string : ', s2)
# Calling the isalpha() method on second string object
print('isalpha() method on second string : ', s2.isalpha())
# Creating the third string
s4 = ('Bonjour!')
# Printing the third string
print('The third string : ', s4)
# Calling the isalpha() method on third string object
print('isalpha() method on third string : ', s4.isalpha())
The first string : Donald Duck!
isalpha() method on first string : False
The second string : The_Seven_Chakras
isalpha() method on second string : False
The third string : Bonjour!
isalpha() method on third string : False
Advertisement
Advertisement
Please check our latest addition
C#, PYTHON and DJANGO
Advertisement