Given an array (ints) of n integers, find three integers in arr such that the sum is closest to a given number (num), target.
Return the sum of the three integers. 
You may assume that each input would have exactly one solution.
Example:
Note: your solution should not modify the input array.
import itertools

def closest_sum(ints, num):
    res = ints[:3]
    comb = list(itertools.combinations(ints, 3))
    for i in comb:
        if abs(num-sum(i)) < abs(num-sum(res)):
            res = [_ for _ in i]
    return sum(res)
import itertools

def closest_sum(ints, num):
    res = ints[:3]
    comb = list(itertools.combinations(ints, 3))
    for i in comb:
        if abs(num-sum(i)) < abs(num-sum(res)):
            res = [_ for _ in i]
    return sum(res)