[Tutor] Advice for my function, isPrime(n), please

Daniel Sarmiento dsarmientos at gmail.com
Mon Jul 21 19:20:59 CEST 2008


What about the following function?

if x == 0:
    return False
return True


I am a beginner, but I think it is more clear (at least to me) what
the function does. And it is only one line longer than

value = (x != 0)
return value


More information about the Tutor mailing list