On 21/02/07, Christopher Spears <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] ./text_proc 151> ./summer_v04.py > table.txt > File "./summer_v04.py", line 6 > numCols = max(len(cols) for cols in line_list) > ^ > SyntaxError: invalid syntax
What version of python are you running? If you are running 2.3.x or earlier, you will need to rewrite this as: numCols = max([len(cols) for cols in line_list]) (because you are using a generator expression, and they were only introduced in 2.4) -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor