def centeroidpython(data):
    x, y = zip(*data)
l = len(x)
return sum(x) / l, sum(y) / l
data = list(tuple(i) for i in data)
Fastest way to calculate the centroid of a set of coordinate tuples in python without numpy