Python or R - which one should you learn?
In the field of data science and machine learning, Python and R are widely used. New data science practitioners often ask which language should they focus on. As I spend time working in both languages, I notice certain strengths and weaknesses of each language. Here is my comparative compilation. Be warned though, both languages are evolving and I am continuously learning so my views are bound to change as well.
Take the above comparison with a grain of salt, because in practice, the choice of a programming language is often dictated by other real-world constraints such as cost, talent availability, training, and prior investment, or even emotional attachment.
As a good data scientist or ML practitioner, you should ultimately become comfortable with both languages and pick the right tool from the toolbox based on your use case. If you are capable of translating your problem into abstract terms (thinking about a problem in statistical terms is abstract thinking), and you know the strengths and weaknesses of each language, then the choice of language should come to you naturally. If you are completely new and just plan to pick one language, then choose Python.