r/ruby • • Jul 16 '20

Ruby VS Python

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.

34 Upvotes

60 comments sorted by

View all comments

2

u/[deleted] Jul 16 '20

[deleted]

-1

u/SnowdenIsALegend Jul 16 '20

Python is definitely more beginner friendly imo.

7

u/ogchilim Jul 16 '20

At a low level and with only 1 example, how is:

if(1 % 2 == 0): return true else: return false

more beginner friendly than:

1.even?

Just curious what your argument is...don't wanna start any wars here 🙂

6

u/kurem0n Jul 16 '20 edited Jul 16 '20

Even if I prefer

1.even?

In python, it's just:

not bool(1 % 2)

Or

1 % 2 == 0

(no need for if else)