If going with the web, I'd go with JavaScript, to a degree you have to learn it anyway. Python and Ruby are both relevant for web as well. Rails vs Flask/Django - both will get the job done, plenty of use cases of major corporations using one or the other. If you're doing DevOps, you should probably learn both. Everything else, which is more backend, APIs, data, data science, AWS, Google Cloud, Big Data databases, et…
But as of yet there's nothing in the JS ecosystem that compares to Ruby on Rails or Django for back-end stuff, so it's worth learning one or both those two as well.
For finding work: learn both, or pick the one that is more popular in your desired field, geographic location, etc.
For improving yourself as a programmer: go for Python first but learn both (good introduction to how programming languages are both different and alike). If you can't be bothered by or interested or learning both, reconsider your field of work, because both are fun.
For anything else: if you're capable of weighing the pros and cons of either in regards to support (hiring coders), project size, level of complexity needed etc.: Python strikes me as the slightly safer / more robust choice, especially in academia, but I'm not confident about recommending either one primarily.