Sorting Array of Objects using Ruby and Python

From my previous post, I had explained on how to sort an array consists of objects by object’s attribute using PHP. While on PHP sorting by object’s attribute requires additional function other than sorting itself, Ruby and Python has it’s own array of object sorting syntax. For example in Ruby, the following one line syntax will sort an array named population by comparing it’s objects length property (attribute) ascendingly without Continue reading Sorting Array of Objects using Ruby and Python