Python3 一行代码系列——判断一个数是否是质数

· · 题解

print((lambda x: x >= 2 and all(map(lambda y: x % y != 0, range(2, int(x ** 0.5) + 1))))(int(input())))