3 ms·
You're right, but what I listed are generally considered the most idiomatic (the ternary one will be situational though). So when a beginner is trying to read s
by meowface 13y ago
You're right, but what I listed are generally considered the most idiomatic (the ternary one will be situational though). So when a beginner is trying to read someone else's code, they're likely to see those.
But if they read some Python code that a seasoned veteran wrote, they're a lot less likely to see anything particularly confusing.
I think Ruby does generally look more elegant, but if I was a beginner again I sure as hell would have a much easier time reading Python code compared to Ruby code.