RPSLS in python