HackerRank Python - Any or All
This expression returns True if any element of the iterable is true.
If the iterable is empty, it will return False.
# Enter your code here. Read input from STDIN. Print output to STDOUT
_ = input()
n = input().split()
print(all([int(i) > 0 for i in n]) and any([j == j[::-1] for j in n]))
Please click on the like button if it worked
Solution not working or have any suggestions? Please send an email to [email protected]
donate a cup of tea :)
Join Our Facebook Group
Popular HackerRank Python Solutions
Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more.
Sign Up for our weekly newsletter to get update about new content.