<filename>LeetCodeSolutions/python/462_Minimum_Moves_to_Equal_Array_Elements_II.py
class Solution(object):
    def minMoves2(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        median = sorted(nums)[len(nums) / 2]
        return sum(abs(num - median) for num in nums)

<filename>LeetCodeSolutions/python/462_Minimum_Moves_to_Equal_Array_Elements_II.py
class Solution(object):
    def minMoves2(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        median = sorted(nums)[len(nums) / 2]
        return sum(abs(num - median) for num in nums)

:type nums: List[int]         :rtype: int