On Wed, Mar 11, 2009 at 7:47 AM, Andre Engels wrote:
> 2009/3/11 Emad Nawfal (عماد نوفل) :
>
> > Now I know that I did not ask the right question. What I meant was: how
> to
> > extract a sublist from a list whose length is unknown. Let's say I have a
> > hundred of these lists and each of these
Kent Johnson wrote:
When replying to digest messages, please
- change the subject to the subject of the message you are replying to
- trim the message body to contain only the (portion of the) message
you are replying to
Thanks,
Kent
___
Tutor maillist
Hey Stefan,Thanks for your response.My script is similar to yours, but as
you've pointed that it could be temporary. I've been retrying to connect and
send email but in vain. Here's the snippet of my code. Can you debug and help
me what could really have gone wrong. import smtplib import base6
Hey Senthil,Thanks for your response. My script is similar to yours, but as
you've pointed that it could be temporary. I've been retrying to connect and
send email but in vain.Here's the snippet of my code. Can you debug and help me
what could really have gone wrong.import smtplibimport base64s
When replying to digest messages, please
- change the subject to the subject of the message you are replying to
- trim the message body to contain only the (portion of the) message
you are replying to
Thanks,
Kent
___
Tutor maillist - Tutor@python.org
Reply to Message 3 : How can I extract a specific sublist from a
nested list?Comments Inline Original message From:tutorrequ...@python.org<
tutorrequ...@python.org >Date: 11 Mar 09 12:12:51Subject:Tutor Digest, Vol 61,
Issue 42To: tu...@python.orgsend Tutor mailing list submissions to
tu...@py
2009/3/11 Emad Nawfal (عماد نوفل) :
> Now I know that I did not ask the right question. What I meant was: how to
> extract a sublist from a list whose length is unknown. Let's say I have a
> hundred of these lists and each of these has an NP somewhere, it could be
> nested in nested list, which is
2009/3/11 Alan Gauld
> "Emad Nawfal (عماد نوفل)" wrote
>
>> How can I extract a specific sublist (??) from a nested list,
>>
>
> Just extract eaach item using indexing. So first extract the sublist,
> then from the sublist extract the item.
>
> if I want to extract the sublist ["ADJ", "good"],
"Emad Nawfal (عماد نوفل)" wrote
How can I extract a specific sublist (??) from a nested list,
Just extract eaach item using indexing. So first extract the sublist,
then from the sublist extract the item.
if I want to extract the sublist ["ADJ", "good"], or the bigger
sublist
["NP",["DET", "T
Just a suggestion:
It would be better if you turn this list into a dictionary. I presume
you want to know the "adjective" or "noun" of the sentence. To do
that, it would be easier if you had a dictionary.
You can do this as:
>> dict(nested_sublist[1])
{'ADJ': 'good', 'DET': 'The', 'NOUN': 'man'}
Emad Nawfal (عماد نوفل) wrote:
Hi Tutors,
How can I extract a specific sublist (??) from a nested list, for
example,
The same as the way you extract other objects from non-nested list
if I want to extract the sublist ["ADJ", "good"],
nested_list[1][2]
or the bigger
sublist ["NP",["DET"
11 matches
Mail list logo