I tried writing a function that returns 'True' if the given parameter is a prime number and 'False' otherwise. In a sense, I achieved my goal but I just wanted to know of a better, more pythonic way to do it, here's what I came up with: def prime_one_liner(n): return True if len([i for i in range(2,n) if n % i == 0]) == 0 else False Continue reading...