Re: [Tutor] How can I extract a specific sublist from a nested list?

2009-03-11 Thread عماد نوفل
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

Re: [Tutor] Replying to digest messages

2009-03-11 Thread Lie Ryan
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

Re: [Tutor] How to send an email using Python

2009-03-11 Thread Samuel Avinash
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

Re: [Tutor] How to send an email using Python

2009-03-11 Thread Samuel Avinash
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

[Tutor] Replying to digest messages

2009-03-11 Thread Kent Johnson
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

Re: [Tutor] Tutor Digest, Vol 61, Issue 42

2009-03-11 Thread Samuel Avinash
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

Re: [Tutor] How can I extract a specific sublist from a nested list?

2009-03-11 Thread Andre Engels
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

Re: [Tutor] How can I extract a specific sublist from a nested list?

2009-03-11 Thread عماد نوفل
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"],

Re: [Tutor] How can I extract a specific sublist from a nested list?

2009-03-11 Thread 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"], or the bigger sublist ["NP",["DET", "T

Re: [Tutor] How can I extract a specific sublist from a nested list?

2009-03-11 Thread prasanna
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'}

Re: [Tutor] How can I extract a specific sublist from a nested list?

2009-03-11 Thread Lie Ryan
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"