This is just compare the two language in very details as sort of note for myself.
Lemme start from the very basic one:
In Python, I write
In Ruby, I write
Though Ruby is more flexible, I prefer the way python coding. Ruby is hiring two special character: $, and $\ to represent separator (sep= in Py) and append (end= in Py)
Ruby has puts which is being more widely used same as python's print (with sep param set as '\n'). However python seems simpler and more clear.
No comments :
Post a Comment