Re: Object in List : how?

2022-07-25 Thread Khairil Sitanggang
Again, thank you so much for all your suggestions; it's even easier for me now to proceed with my coding with all the guidance in one place (this email thread). I highly appreciate all of your help. I love this python community :) Regards, -Irfan On Mon, Jul 25, 2022 at 12:38 PM Dennis Lee Bieb

Re: Object in List : how?

2022-07-25 Thread Khairil Sitanggang
unching. Even though the final goal is to get the correct results, I still want to write it following the correct python "grammar" and style. Best regards, -Irfan On Mon, Jul 25, 2022 at 3:54 AM Peter Otten <__pete...@web.de> wrote: > On 25/07/2022 02:47, Khairil Sitanggang w

Re: Object in List : how?

2022-07-24 Thread Khairil Sitanggang
r = self.a + 10 return r nd1 = Node1(10) nd2 = Node2(10, 0) # 0 is dummy, will be overwritten by the call to calculation() On Sun, Jul 24, 2022 at 2:23 AM Peter Otten <__pete...@web.de> wrote: > On 23/07/2022 06:28, Khairil Sitanggang wrote: > > Hello Expert: > >

Re: Object in List : how?

2022-07-24 Thread Khairil Sitanggang
Peter: Thanks for the explanation. It is clear and easy to understand for a beginner like me. I highly appreciate it. Regards, -Irfan On Sun, Jul 24, 2022 at 2:23 AM Peter Otten <__pete...@web.de> wrote: > On 23/07/2022 06:28, Khairil Sitanggang wrote: > > Hello Expert: > &g

Re: Object in List : how?

2022-07-24 Thread Khairil Sitanggang
Thank you. On Sun, Jul 24, 2022 at 2:23 AM Peter Otten <__pete...@web.de> wrote: > On 23/07/2022 06:28, Khairil Sitanggang wrote: > > Hello Expert: > > > > I just started using python. Below is a simple code. I was trying to > check > > if, say, NO1 is not

Re: Object in List : how?

2022-07-23 Thread Khairil Sitanggang
dn, Thanks for the good analogy and explanation. I need some time to digest it. Regards, -Irfan On Sat, Jul 23, 2022 at 6:55 PM dn wrote: > On 24/07/2022 09.57, MRAB wrote: > > On 23/07/2022 05:28, Khairil Sitanggang wrote: > >> Hello Expert: > >> > >> I

Re: Object in List : how?

2022-07-23 Thread Khairil Sitanggang
st on behalf of MRAB Sent: Saturday, July 23, 2022 4:57:34 PM To: python-list@python.org Subject: Re: Object in List : how? On 23/07/2022 05:28, Khairil Sitanggang wrote: > Hello Expert: > > I just started using python. Below is a simple code. I was trying to check > if, say,

Object in List : how?

2022-07-23 Thread Khairil Sitanggang
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 =