r_to_python function

Convert R Code to Python Code