python string isalpha 28 29

Solutions on MaxInterview for python string isalpha 28 29 by the best coders in the world

showing results for - "python string isalpha 28 29"
Anthony
12 Apr 2019
1# Valid alphabet
2text1= "HelloWorld"
3print(text1.isalpha())
4
5# contains whitespace
6text2 = "Hello World"
7print(text2.isalpha())
8
9# contains Special Character
10text3 = "HelloWorld!!"
11print(text3.isalpha())
12
13
14# contains Alphanumeric
15text3 = "Hello123"
16print(text3.isalpha())
Mirko
26 Apr 2019
1username = input("Choose a username:")
2
3if username.isalnum() == True:
4	print("The entered username is ", username)
5else:
6	print("Please enter a valid usernameSrin.")