We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
print(any(c.isalnum() for c in s))
print(any(c.isalpha() for c in s))
print(any(c.isdigit() for c in s))
print(any(c.islower() for c in s))
print(any(c.isupper() for c in s))
string = input()
str_list = list(string)
methods = ['isalnum', 'isalpha', 'isdigit', 'islower', 'isupper']
for method in methods:
if True in [eval(f'char.{method}()') for char in str_list]:
print(True)
else:
print(False)
Please Login in order to post a comment