There is not much difference between Python and Ruby since these are very similar, but have different approaches to solve problems. Both Django and Rails which are the web frameworks written in Python and Ruby respectively, are much similar at the core but differ in the way their features are implemented. Ruby is called a programmer’s best friend since it is very flexible whereas Python is an explicit language which has a more direct approach to programming and makes debugging easier.
Now coming to your question, Python has a lot more diverse community than Ruby. With Ruby, we can do a lot like creating GUIs and image recognition but most of the Ruby developers get employed as web developers. Almost everything that we can do with Ruby can be done with Python and vice versa. Moreover, if you are interested in data science, Python is a better choice.