I cant seem to figure out what the problem is here.i'm using this code to create multiple groups of numbers from an array.i'm not sure if it is a python compatibility issue or not.
data=[]
data=1,2,3,4,6,7,8,11,12
for k, g in groupby(enumerate(data), lambda i, x: i-x):
print map(itemgetter(1), g)
<TypeError: <lambda>() missing 1 required positional argument: 'x'