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
- Built-Ins
- Any or All
- Discussions
Any or All
Any or All
Sort by
recency
|
737 Discussions
|
Please Login in order to post a comment
n=int(input()) A=input().split() B=[] if all(int(x)>0 for x in A) and any([list(a)[::-1]==list(a) for a in A]): print(True) else: print(False)
n, nums = int(input()), input().split() print(all(int(i) > 0 for i in nums) and any (i == i[::-1] for i in nums))