'What does for loop does after a Boolean statement? [duplicate]
I've just seen this code and I got confused. I couldn't understand all([int(i) > 0 for i in a]) part. In this part What does 'for' loop does?
a = input().split()
if (all([int(i) > 0 for i in a]) and any([(i) == (i)[::-1]] for i in a)):
print(True)
else:
print(False)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
