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.
- Prepare
- Python
- Strings
- String Validators
- Discussions
String Validators
String Validators
Sort by
recency
|
1928 Discussions
|
Please Login in order to post a comment
if name == 'main': def get_attribute(string,attribute): count = 0 for i in string: if getattr(i,attribute)() is True: count +=1 if count>0: print(True) else: print(False)
My solution:
if name == 'main':
using all() or any()
Here is a simple solution to this problem
if name == 'main': s = input() alphanum = False alphabetical = False number = False lowercase = False Uppercase = False
if name == 'main': s = input() alphanum = False alphabetical = False number = False lowercase = False Uppercase = False