isaplha in python
str = "abc"
print(str.isalpha())
what does isalpha do in python
The isalpha() method returns True if all the characters are alphabet letters (a-z).
Python String isalpha()
# Valid alphabet
text1= "HelloWorld"
print(text1.isalpha())
# contains whitespace
text2 = "Hello World"
print(text2.isalpha())
# contains Special Character
text3 = "HelloWorld!!"
print(text3.isalpha())
# contains Alphanumeric
text3 = "Hello123"
print(text3.isalpha())
Python String isalpha()
username = input("Choose a username:")
if username.isalnum() == True:
print("The entered username is ", username)
else:
print("Please enter a valid usernameSrin.")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us