1. RPy2  is a package that can be used to call R objects in Python

  2. Look at this function

is.prime<-function(x) {
if(x%%2==0) {return(FALSE)
} else {
y<-3
while(y<x)  ifelse(x%%y==0,return(FALSE),y<-y+2) }
return(TRUE)
}

I was surprised to see the usage of ifelse and then later I realized that it was useful for cutting down code