

It is up to you to decide which language better suits your needs, but my advice to you would be to learn Python. If you are only concerned with pure statistics from an academic perspective, then many features of Python may be completely irrelevant to you and you may consider it a waste of time to learn them. However, R is a smaller and more focused language that is entirely focused on stats and machine learning. Python is an extremely powerful language with a simple syntax, extremely broad applications, and tons of open source libraries, modules and tools that do a million different things. In this case, your statistical applications are more intertwined with the functionality of the website, and R is not built to handle all of these types of tasks since many of them are unrelated to statistics. The script is executed a few times per day, it flags certain users according to the output of your analysis, then sends notifications to those users. You write a python script that performs some statistical analysis on the user data. A use case where Python would beat R would be if you are working for a website, and they collect data on all of their users. If you are interested in using stats for industry applications, such as building stats and machine learning models that are integrated into a larger system architecture through data pipelines, then I would learn Python along with some Python libraries for stats, machine learning and data analysis (Pandas, Stats, Scikitlearn, Numpy).

A good use case for R would be if you have a dataset and you just want to do some analysis and write a paper about your conclusions.

If you are interested in pure stats solely for the purpose of academic research, I would learn R.
