Sorry for some not mature questions asked before, fixed now by:

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]:
                        if ((int(list1[i][j])) < 43 and (int(list1[i][j-1])) < 
43):
                            g.add_edge(list1[i][j], list1[i][j+1])
    for i in range(43,84):
        if g.has_node(i):
                    g.delete_node(i)
    g.draw('graph4.png', prog="dot")


just still don't get why the "if" does not work as expected.



On Tue, Nov 15, 2011 at 10:19 PM, lina <lina.lastn...@gmail.com> wrote:
> <snip>
>
> I have a little issue regarding this one, the updated code:
>
> 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]:
>                        if(int(list1[i][j])) < 43:
>                            if(int(list1[i][j-1])) < 43:
>                                g.add_edge(list1[i][j], list1[i][j+1])
>    g.draw('graph4.png', prog="dot")
>
>
> I am confused, why this one still include the digital bigger than 43?
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to