One line python code:


#1

class Solution:
def maxp3(self, A):
A=sorted(A)
return(max((A[len(A)-1]*A[len(A)-2]*A[len(A)-3]),(A[0]*A[1]*A[len(A)-1])))