Ruby delivers on the promise of being "optimized for programmer happiness." But I think that in order to experience that you have to become fairly immersed. In fact, some of the best parts seem outright offensive at first (question marks in method names?!). No language is perfect. But once you get past the idiosyncrasies, I honestly do think Ruby feels better. That's pretty esoteric, so I'll try to call out some specifics as well. I agree with most of what's already been said, but I'll try to add a few things. In order of most to least significance (for me): The standard library, especially with regard to collection methods. Want to slice/filter/sort/chunk an array/hash in some weird way? Ruby's standard library almost certainly supports it. So many amazing things are built-in across the board. Not relying on indentation for scoping. It's one of my biggest beefs with Python. Yes, of course, code should be indented properly. But goodness....let my linter enforce that, not the interpreter. I don't love ruby's do/end keywords (I prefer curly-braces), but at least having a visual cue for end-block is a vast improvement over python. A more consistent interface. Everything is an object, and you invoke methods on those objects. I think [].size just makes more intuitive sense than len([]). Great readability boosts from things like question-marks or exclamation-points in method names (admittedly that felt gross and wrong at first), trailing if-statements, unless-conditionals, invoking methods without parens (though I only sanction this if not passing args). A more helpful, less snobby community. 100% just my personal experience, maybe I've just had bad luck with pythonistas. No __init__.py nonsense. Maybe that's fixed/improved in python3? But I hate it. In fact, I hate any use of dunders...littering the code with unreadable symbols. Answer from human_tendencies on reddit.com
🌐
GitHub
github.com › mjhea0 › python-ruby
GitHub - mjhea0/python-ruby: Should I Learn Python or Ruby? · GitHub
Without a doubt, Python is much easier to learn because of how the language is structured - and how explicit it is. One can literally become proficient in two to three months. Ruby takes much longer to learn due to its flexibility.
Starred by 322 users
Forked by 32 users
Languages   Python 56.6% | Ruby 43.4%
🌐
Quora
quora.com › Which-is-better-for-a-beginner-Python-or-Ruby
Which is better for a beginner, Python or Ruby? - Quora
Answer (1 of 22): Both are great languages to start with. And the comparison usually boils down to ecosystem and tools available and what you want to do with them. I would suggest figuring that before deciding on one. The ecosystems (package management, libraries, tools) are excellent for both t...
Discussions

Benefits of moving from Python to Ruby?

When it comes to scripting languages, the objective differences are very nuanced. Largely, it depends on what you want to do. Python, for example, is extremely popular in the data sciences. A complementary example for Ruby would be rapid application development with Ruby on Rails, a web framework that allows you to build web applications very quickly. Another example would be building an API using Ruby's Sinatra library. Python also has web frameworks, so it's not as if Ruby has an exclusive claim to this benefit, but many developers find tools like Ruby on Rails and Sinatra very satisfying and beneficial to work with.

My recommendation would be to give Ruby an honest shot. Don't make the mistake of simply trying to write Python code using Ruby. Really dig in to what makes Ruby, Ruby. If you enjoy it, then you've added another language to your tool belt. If you don't, you might walk away with some ideas about development that you can apply to Python.

More on reddit.com
🌐 r/ruby
40
32
May 31, 2022
Ruby VS Python
I think Python has a bigger community, and that is it's single largest advantage. It has more deployments and more packages. In think ruby has better syntax, better readability, and a more sensible design overall. This makes it easier for greater involvement from the community, there are something like 2x note python devs but not nearly 2x the packages. I also think the ruby community is better at communicating best practices. Consider that the top Ruby packages are testing tools and the top python of are a mix of docker and db stuff. https://rubygems.org/stats https://pypi.org/ I also find Ruby projects to have better engineering. This might just be bias but having tried similar things in both languages maintainability, support, and things working years later (except web API bindings) are nearly magical. The ruby community always seems to try to be doing better, but I guess that is most communities, but I feel like python users just want to be done and damn the tech debt, full speed ahead. EDIT 2 years later - spelling More on reddit.com
🌐 r/ruby
61
33
July 16, 2020
Is Ruby easier than Python?

This is purely subjective. By asking on a Ruby community, you're likely to get very skewed answers.

More on reddit.com
🌐 r/ruby
103
44
December 2, 2023
Why Ruby Is More Readable Than Python
I've loved every Ruby codebase that I've written. I still consider it one of my favorite programming languages, and (in pedagogical terms) one of the best languages for learning "practical" functional programming (point-free style, blocks as intuitive closures, &c.). But when I work with others, ... More on news.ycombinator.com
🌐 news.ycombinator.com
146
92
July 27, 2022
People also ask

Is Ruby better than Python?
This question can set off a great debate that can easily devolve into madness. If you look at Python vs Ruby, they certainly have their similarities. However, Python is often better when it comes to educational use and for making quick apps and programs, while Ruby is usually the choice for those who want to make commercial web apps. The choice depends on your (or your project’s) needs and ultimately comes down to personal preference.
🌐
hackr.io
hackr.io › home › articles › programming
Ruby vs Python: Differences You Should Know [Updated] 2026
Which is easier, Ruby or Python?
If you’re a beginner looking to learn either of the two languages, you may be wondering which one would be easier to start with. One of the best ways to figure out which one would be easier is to look at Ruby vs Python syntax. Purely based on syntax, Python wins — simply because it uses simpler, more natural language.
🌐
hackr.io
hackr.io › home › articles › programming
Ruby vs Python: Differences You Should Know [Updated] 2026
Can you use Ruby and Python together?
Yes! It is certainly possible to use Ruby and Python together. If you’d like to know more about how Ruby and Python can work together, you can look at this article. It even includes an example!
🌐
hackr.io
hackr.io › home › articles › programming
Ruby vs Python: Differences You Should Know [Updated] 2026
🌐
Coursera
coursera.org › coursera articles › computer science and engineering › web and app development › ruby vs. python: which should you choose?
Ruby vs. Python: Which Should You Choose? | Coursera
February 7, 2026 - If you're unsure what you'd like to build and you're searching for a good first programming language to learn, Python is highly recommended. Ruby is associated with high developer productivity thanks to its rapid development capabilities, concise syntax, and code reusability.
🌐
Reddit
reddit.com › r/ruby › benefits of moving from python to ruby?
r/ruby on Reddit: Benefits of moving from Python to Ruby?
May 31, 2022 -

Question from someone who invested much time in Python. What benefits Ruby has to convince to move? Instead continue with Python?

Top answer
1 of 13
34

When it comes to scripting languages, the objective differences are very nuanced. Largely, it depends on what you want to do. Python, for example, is extremely popular in the data sciences. A complementary example for Ruby would be rapid application development with Ruby on Rails, a web framework that allows you to build web applications very quickly. Another example would be building an API using Ruby's Sinatra library. Python also has web frameworks, so it's not as if Ruby has an exclusive claim to this benefit, but many developers find tools like Ruby on Rails and Sinatra very satisfying and beneficial to work with.

My recommendation would be to give Ruby an honest shot. Don't make the mistake of simply trying to write Python code using Ruby. Really dig in to what makes Ruby, Ruby. If you enjoy it, then you've added another language to your tool belt. If you don't, you might walk away with some ideas about development that you can apply to Python.

2 of 13
27

Ruby delivers on the promise of being "optimized for programmer happiness." But I think that in order to experience that you have to become fairly immersed. In fact, some of the best parts seem outright offensive at first (question marks in method names?!). No language is perfect. But once you get past the idiosyncrasies, I honestly do think Ruby feels better. That's pretty esoteric, so I'll try to call out some specifics as well.

I agree with most of what's already been said, but I'll try to add a few things. In order of most to least significance (for me):

The standard library, especially with regard to collection methods. Want to slice/filter/sort/chunk an array/hash in some weird way? Ruby's standard library almost certainly supports it. So many amazing things are built-in across the board.

Not relying on indentation for scoping. It's one of my biggest beefs with Python. Yes, of course, code should be indented properly. But goodness....let my linter enforce that, not the interpreter. I don't love ruby's do/end keywords (I prefer curly-braces), but at least having a visual cue for end-block is a vast improvement over python.

A more consistent interface. Everything is an object, and you invoke methods on those objects. I think [].size just makes more intuitive sense than len([]).

Great readability boosts from things like question-marks or exclamation-points in method names (admittedly that felt gross and wrong at first), trailing if-statements, unless-conditionals, invoking methods without parens (though I only sanction this if not passing args).

A more helpful, less snobby community. 100% just my personal experience, maybe I've just had bad luck with pythonistas.

No __init__.py nonsense. Maybe that's fixed/improved in python3? But I hate it. In fact, I hate any use of dunders...littering the code with unreadable symbols.

🌐
UpGuard
upguard.com › blog › python-vs-ruby
Ruby vs Python: Comparing Languages | UpGuard
January 9, 2025 - Ruby has also done well in devops, with tools like Chef taking full advantage of the expressive power of the scripting language. All this does not mean that Python is a slouch in web development. It has some unique tricks all its own: speed and a super large ecosystem. There is a perception that Python is faster than Ruby, and this has often led teams to prefer it over Ruby for web development.
🌐
BootcampRankings
bootcamprankings.com › ruby-vs-python
Ruby vs Python: Which One Should Be Your First Programming Language? | BootcampRankings
August 24, 2021 - Ruby’s high flexibility allows developers to experiment with code, yet it’s a lot harder to check for bugs. Consequently, developers using Ruby will spend much more time testing databases and the software. The main objective of Python is to be simple to read and understand.
Find elsewhere
🌐
RedSwitches
redswitches.com › blog › python-vs-ruby
Python vs Ruby: Best Programming Language in 2024
May 13, 2024 - While also considered beginner-friendly, Ruby may have a steeper learning curve than Python. This is where the Python vs Ruby syntax debate begins. Ruby’s syntax is elegant and expressive but can be more intricate for newcomers.
🌐
Reddit
reddit.com › r/ruby › ruby vs python
r/ruby on Reddit: Ruby VS Python
July 16, 2020 -

More than a versus (it's more striking) I would really like to know what things they have in common and how they differ, what their main advantages are compared to the other and of course their opinion of them. One point to take into account is because they believe that python is more used in AI and Machine learning developments.

Top answer
1 of 5
35
I think Python has a bigger community, and that is it's single largest advantage. It has more deployments and more packages. In think ruby has better syntax, better readability, and a more sensible design overall. This makes it easier for greater involvement from the community, there are something like 2x note python devs but not nearly 2x the packages. I also think the ruby community is better at communicating best practices. Consider that the top Ruby packages are testing tools and the top python of are a mix of docker and db stuff. https://rubygems.org/stats https://pypi.org/ I also find Ruby projects to have better engineering. This might just be bias but having tried similar things in both languages maintainability, support, and things working years later (except web API bindings) are nearly magical. The ruby community always seems to try to be doing better, but I guess that is most communities, but I feel like python users just want to be done and damn the tech debt, full speed ahead. EDIT 2 years later - spelling
2 of 5
11
Python was designed with a thing in mind: there is one best way to do something and that's all. Ruby lets you express yourself. There is always different ways to do something in Ruby (or at least I feel like it). It's up to you to decide if you see this as good or bad. Python has a really larger community. Mainly in sciences and data analysis. Probably because scientists that are not programmers found the language well suited because of it's ease of use. And there's a whole lot of scientific libraries. People bring people and so on... On a more personal side, I don't really like python because I don't find it... elegant. I use Ruby for personal projects and scripts as I know how to get things done with this little fella. Disclaimer though: I'm still a college student and don't have that much experience.
🌐
Reddit
reddit.com › r/ruby › is ruby easier than python?
Is Ruby easier than Python? : r/ruby
December 2, 2023 - It depends. Ruby has more syntax than Python and doesn't have the greatest module system ever, which makes it harder for beginners to truly understand.
🌐
Hackr
hackr.io › home › articles › programming
Ruby vs Python: Differences You Should Know [Updated] 2026
January 30, 2025 - Ruby may be more difficult to debug · Ruby is one of the most common and popular general-purpose languages to create web applications. Rails or Ruby on Rails is an elegant and robust framework that is built on the MVC architecture and has loads ...
🌐
One Month
learn.onemonth.com › home › ruby vs. python: what’s the difference?
Ruby vs. Python: What's the Difference? - Learn to code in 30 Days!
September 30, 2022 - Ruby is designed to be infinitely flexible and empowering for programmers. It allows Ruby on Rails to do lots of little tricks to make an elegant web framework. This can feel even magical at times, but the flexibility can also cause some problems. For example, the same magic that makes Ruby work when you don’t expect it to can also make it very hard to track down bugs, resulting in hours of combing through code. Python takes a more direct approach to programming.
🌐
Guru99
guru99.com › home › python › python vs ruby – difference between them
Python vs Ruby – Difference Between Them
August 12, 2024 - Python lambda functions are larger, while Ruby supports only a single-line lambda function. Python is very explicit and elegant to read, while Ruby can be very hard to debug at times.
🌐
GeeksforGeeks
geeksforgeeks.org › python-vs-ruby
Python vs Ruby - GeeksforGeeks
September 3, 2024 - Ruby is a dynamic programming language due to which there is no tough rules on how to built in features and it is very close to spoken languages. Python is a simple, easy-to-learn, powerful, high level and object-oriented programming language.
🌐
Medium
medium.com › @vishalsadriya1224 › performance-comparison-ruby-vs-python-vs-go-counting-character-occurrences-e824b5918106
Performance Comparison: Ruby vs. Python vs. Go — Counting Character Occurrences | by Vishal Sadriya | Medium
January 15, 2024 - Ruby: Ruby is an interpreted language, which generally has a higher runtime compared to compiled languages. Python: Python has better runtime performance than Ruby but still falls behind Go.
🌐
Hacker News
news.ycombinator.com › item
Why Ruby Is More Readable Than Python | Hacker News
July 27, 2022 - I've loved every Ruby codebase that I've written. I still consider it one of my favorite programming languages, and (in pedagogical terms) one of the best languages for learning "practical" functional programming (point-free style, blocks as intuitive closures, &c.). But when I work with others, ...
🌐
BairesDev
bairesdev.com › home › blog › software development
Which Language Is Best, Python or Ruby?
Performance: Python can have performance limitations when compared to lower-level languages like C or C++ due to its interpreted nature. However, Python offers various tools and techniques such as leveraging compiled extensions to mitigate performance bottlenecks when necessary. Mobile Development: Similar to Ruby Python is not widely used for native mobile app development.
🌐
Techfly
techfly.in › home › blog › is ruby harder than python? let’s break it down.
Is Ruby Harder Than Python? | Ruby Language Jodhpur
July 15, 2025 - If you’re completely new to programming, Python might seem slightly easier at first due to its widespread tutorials and use in academia. But if your goal is to build web applications quickly and elegantly, Ruby on Rails could be the perfect choice. And no, Ruby isn’t harder than Python—it’s just different.
🌐
JayDevs
jaydevs.com › ruby-vs-python
Ruby vs. Python: Which Language Will Power Your Project in 2024? - JD
November 11, 2025 - Performance Limitations: Python has a relatively slower app speed than Java or C++. Limited for Mobile Development: Python is not optimized for mobile apps, which can be a drawback in commercial usage scenarios. Apart from their distinct features, both Python and Ruby share common characteristics.
Top answer
1 of 16
34

Ruby has the concepts of blocks, which are essentially syntactic sugar around a section of code; they are a way to create closures and pass them to another method which may or may not use the block. A block can be invoked later on through a yield statement.

For example, a simple definition of an each method on Array might be something like:

class Array
  def each
    for i in self  
      yield(i)     # If a block has been passed, control will be passed here.
    end  
  end  
end  

Then you can invoke this like so:

# Add five to each element.
[1, 2, 3, 4].each{ |e| puts e + 5 }
> [6, 7, 8, 9]

Python has anonymous functions/closures/lambdas, but it doesn't quite have blocks since it's missing some of the useful syntactic sugar. However, there's at least one way to get it in an ad-hoc fashion. See, for example, here.

2 of 16
28

Python Example

Functions are first-class variables in Python. You can declare a function, pass it around as an object, and overwrite it:

def func(): print "hello"
def another_func(f): f()
another_func(func)

def func2(): print "goodbye"
func = func2

This is a fundamental feature of modern scripting languages. JavaScript and Lua do this, too. Ruby doesn't treat functions this way; naming a function calls it.

Of course, there are ways to do these things in Ruby, but they're not first-class operations. For example, you can wrap a function with Proc.new to treat it as a variable--but then it's no longer a function; it's an object with a "call" method.

Ruby's functions aren't first-class objects

Ruby functions aren't first-class objects. Functions must be wrapped in an object to pass them around; the resulting object can't be treated like a function. Functions can't be assigned in a first-class manner; instead, a function in its container object must be called to modify them.

def func; p "Hello" end
def another_func(f); method(f)[] end
another_func(:func)      # => "Hello"

def func2; print "Goodbye!"
self.class.send(:define_method, :func, method(:func2))
func                     # => "Goodbye!"

method(:func).owner      # => Object
func                     # => "Goodbye!"
self.func                # => "Goodbye!"    
🌐
Medium
medium.com › @st4046641 › ruby-vs-python-is-ruby-better-than-python-b44ffea28a77
Ruby vs Python: Is Ruby Better than Python? | by Shriyansh Tiwari | Medium
November 6, 2024 - Python’s performance has improved ... data processing and scientific computing. Ruby is generally slower than Python for tasks involving extensive data manipulation or machine learning, as the language is not as focused on these ...