Easy solution 1 line
Code\n\nfrom heapq import nlargest, nsmallest\n\nclass Solution:\n    def maxProductDifference(self, nums: List[int]) -> int:\n        return prod(nlargest(2, n
# Code\n```\nfrom heapq import nlargest, nsmallest\n\nclass Solution:\n    def maxProductDifference(self, nums: List[int]) -> int:\n        return prod(nlargest(2, nums)) - prod(nsmallest(2, nums))\n```\n\nPlease let me know if any improvements can be made.\n\nThanks
['Python3']