Object in List : how?
Khairil Sitanggang
ksit70 at gmail.com
Mon Jul 25 14:29:55 EDT 2022
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 Bieber <wlfraed at ix.netcom.com>
wrote:
> On 23 Jul 2022 22:55:47 GMT, ram at zedat.fu-berlin.de (Stefan Ram) declaimed
> the following:
>
> >Dennis Lee Bieber <wlfraed at ix.netcom.com> writes:
> >> if len([node for node in nodelist if node.no == no1]):
> >> print("Found at least one occurence")
> >
> > I'm not sure you need the "len"; an empty list already is falsy.
> >
>
> Just wanted to be explicit for the OP.
>
>
> --
> Wulfraed Dennis Lee Bieber AF6VN
> wlfraed at ix.netcom.com
> http://wlfraed.microdiversity.freeddns.org/
> --
> https://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list