Hello Expert: I just started using python. Below is a simple code. I was trying to check if, say, NO1 is not in the NODELIST[:].NO How can I achieve this purpose?
Regards, -Irfan class Node: def __init__(self): self.NO = 0 self.A = 20 NODE = Node() NODELIST = [] NODE.NO = 10 NODELIST.append(NODE) NODE.NO = 20 NODELIST.append(NODE) NODE.NO = 30 NODELIST.append(NODE) NO1 = 20 if NO1 not in NODELIST[:].NO ??? -- https://mail.python.org/mailman/listinfo/python-list