On Mon, Jan 7, 2013 at 12:34 AM, Kurt Hansen <kurt@ugyldig.invalid> wrote: > "innermost"? I have replaced this with yours, but all the marked text are > deleted:
Here's the full code, with my change: $< lines = $GEDIT_SELECTED_TEXT.split("\n"); output = '<table\>\n'; for line in lines: output += '<tr\>'; columns = line.split("\t"); for item in columns: output += '<td colspan="' + (4-len(columns)) + '"\>' + item + '</td\> ' output += '</tr\>\n'; output += '</table\>'; return output > It's only one line of code that needs to be changed. Python loops (and other control structures) are defined by indentation, so the innermost loop is the one that starts furthest to the right. Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list