Answers for "hackerrank string validators solution"

0

string validators hackerrank solution

if __name__ == '__main__':
    s = input()
    print(any(i.isalnum() for i in s))
    print(any(i.isalpha() for i in s))
    print(any(i.isdigit() for i in s))
    print(any(i.islower() for i in s))
    print(any(i.isupper() for i in s))

#The any() function returns True if any item in an iterable are true,
#otherwise it returns False.
#If the iterable object is empty, the any() function will return False.
Posted by: Guest on July-02-2020
0

string validator hackerrank

if __name__ == '__main__':
    s = input()
    print(any(a.isalnum() for a in s) )
    print(any(a.isalpha() for a in s) )
    print(any(a.isdigit() for a in s) )
    print(any(a.islower() for a in s) )
    print(any(a.isupper() for a in s) )
Posted by: Guest on October-12-2021

Code answers related to "hackerrank string validators solution"

Python Answers by Framework

Browse Popular Code Answers by Language