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
|
1891 Discussions
|
Please Login in order to post a comment
I am using it and it's working properly.
if name == 'main': i = input() for s in i: is_alnum = any(x.isalnum() for x in i) is_alpha = any(x.isalpha() for x in i) is_digit = any(x.isdigit() for x in i) is_lower = any(x.islower() for x in i) is_upper = any(x.isupper() for x in i)
Took a litle resrearch to find out the correct way :v
Need to use any() function (built-in) that returns True if at least one element in an iterable is True