Function For Prime Numbers Python