is alphabet python
test = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
test.isalpha()
# This will return True if all chars in string are from a-z or A-Z and Flase in all other cases
is alphabet python
test = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
test.isalpha()
# This will return True if all chars in string are from a-z or A-Z and Flase in all other cases
how to check if a string is composed only of alphabets in python
str1 = "hello world. welcome to python examples."
bool = str1.isalpha()
print('str1 contains only alphabets:', bool)
//output will be False
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