So you pretty much need to google tutorials on how to use pyhton and R...unless you've actually attempted what you are trying to accomplish and have some code to show where you are stuck...a google search for tutorials is going to be the best place for you to start.
Google[
^]
Now once you've started and actually have attempted to complete your task, should you get stuck anywhere then feel free to come back with a clear explanation of your issue, relevant code samples and I am sure you will get more meaningful help. Otherwise, teaching you pthon and R is beyond the scope of this quick answer forum.