Any or All
-
Practice>Python>Built-Ins>Any or Allhackerrank.com 2019. 3. 27. 13:04
hackerrank.comAny or AllProblem Link : https://www.hackerrank.com/challenges/any-or-all/problemDifficulty : Easy Tiphow to check the number is palindromicPlease use ::-1, it make reverse arraypalindromic number means that original and reverse are samev == v[::-1] 0 for v in N1) Solution input() N2 = input().split(' ') N1 = list(map(int, N2)) r1 = all(v > 0 for v in N1) r2 = any(v == v[::-1] for ..