Task
You are given a string .
Your task is to find out if the string contains: alphanumeric characters, alphabetical characters, digits, lowercase and uppercase characters.
Input Format
A single line containing a string .
Constraints
Output Format
In the first line, print True
if has any alphanumeric characters. Otherwise, print False
.
In the second line, print True
if has any alphabetical characters. Otherwise, print False
.
In the third line, print True
if has any digits. Otherwise, print False
.
In the fourth line, print True
if has any lowercase characters. Otherwise, print False
.
In the fifth line, print True
if has any uppercase characters. Otherwise, print False
.
Sample Input
qA2
Sample Output
True
True
True
True
True
if __name__ == '__main__':
s = raw_input()
tag = False
for i in s:
# if (ord(i) > 64 and ord(i)< 91) or (ord(i) > 96 and ord(i)< 123) or (ord(i) > 47 and ord(i)< 58) :
# if ('A' <= i <= 'Z') or ('a' <= i <= 'z') or ('0' <= i <= '9'):
if i.isupper() or i.islower() or i.isdigit():
tag = True
break
print tag
tag = False
for i in s:
if i.isupper() or i.islower():
tag = True
break
print tag
tag = False
for i in s:
if i.isdigit():
tag = True
break
print tag
tag = False
for i in s:
if i.islower():
tag = True
break
print tag
tag = False
for i in s:
if i.isupper():
tag = True
break
print tag