[Tutor] IndentationError:

lina lina.lastname at gmail.com
Wed Nov 16 08:52:30 CET 2011


Why it keeps on complaining:

$ python plot-pathway.py
  File "plot-pathway.py", line 35
    if list1[i][j]<=42:
                      ^
IndentationError: unindent does not match any outer indentation level


def PlotPathway(list1):
    for i in range(len(list1)):
        for j in range(len(list1[i])-1):
		    if list1[i][j] != list1[i][j+1]:
		        g.add_edge(list1[i][j], list1[i][j+1])

                if list1[i][j]<=42:
                    g.node_attr.update(color='deepskyblue',style='filled')
                if list1[i][j] > 42:
                    g.node_attr.update(color='green',style='filled')

I checked the indentation very carefully, seems no problems.

really no clue,

Thanks with best regards,


More information about the Tutor mailing list