<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mean_samples(data, xcol, ycollist):
 """Create a sample list that contains the mean of the original list. [(1, 12.5), (2, 7.5), (3, 20.5)] """

    out = []
    numcol = len(ycollist)
    try:
        for elem in data:
            v = 0
            for col in ycollist:
                v += elem[col]
            out.append((elem[xcol], float(v) / numcol))
    except IndexError:
        raise IndexError("bad data: %s,xcol=%d,ycollist=%s" % (data, xcol, ycollist))

    return out