def check_valid_string(s):
msg = []
if not any(ch.isupper() for ch in s):
msg.append('String must have 1 upper case character')
if not any(ch.islower() for ch in s):
msg.append('String must have 1 lower case character')
if not any(ch.isdigit() for ch in s):
msg.append('String must have 1 number')
if len(s) < 10:
msg.append('String length should be at least 10')
if not msg:
return True
print(msg)
return False
password = "Python!@#"
print(check_valid_string(password))
'''
run:
['String must have 1 number', 'String length should be at least 10']
False
'''