Steve,
> Why don't you just pass a slice to itemgetter? py> for key, bereich in groupby(eingabe, itemgetter(slice(0, 2))): WHOW, that is great! that makes it really simple, just have to structure the SQL to make a real "cut first, serve first" structure. Thanks to all who helped! also the "function factory function" bei Dietz was very helpfull; and Peters classes looked really impressive! Thanks again... now my code will be even clearer. Harald -- http://mail.python.org/mailman/listinfo/python-list