[Tutor] String Attribute
Ltc Hotspot
ltc.hotspot at gmail.com
Sat Aug 1 21:00:08 CEST 2015
Hi Everyone:
Let me repost the question:
You will parse the From line using split() and print out the second word in
the line (i.e. the entire address of the person who sent the message). Then
print out a count at the end.
*Hint:* make sure not to include the lines that start with 'From:'.
You can download the sample data at
http://www.pythonlearn.com/code/mbox-short.txt
Regards,
Hal
On Sat, Aug 1, 2015 at 9:18 AM, Emile van Sebille <emile at fenx.com> wrote:
> Hi Hal,
>
> Seeing now that the output is only extracted from six address blocks, can
> you paste in the full contents of the file mbox-short.txt? (or the first
> 5-10 address sets if this is only representative) I think if we have a
> better understanding of the structure of the content you're parsing it'll
> help us identify what the program will need to be prepared to handle.
>
> Emile
>
>
>
> On 7/31/2015 5:26 PM, Ltc Hotspot wrote:
>
>> Hi Mark,
>>
>> Desired output on execution of the script:
>>
>> stephen.marquard at uct.ac.za
>> louis at media.berkeley.edu
>> zqian at umich.edu
>> rjlowe at iupui.edu
>> zqian at umich.edu
>> rjlowe at iupui.edu
>>
>>
>>
>> [...]
>>
>> Regards,
>> Hal
>>
>> On Fri, Jul 31, 2015 at 5:21 PM, Ltc Hotspot <ltc.hotspot at gmail.com>
>> wrote:
>>
>> Mark:
>>> Is this any better, message sent from GMail?
>>> Regards,
>>> Hal
>>>
>>> On Fri, Jul 31, 2015 at 5:02 PM, Mark Lawrence <breamoreboy at yahoo.co.uk>
>>> wrote:
>>>
>>> On 31/07/2015 19:57, ltc.hotspot at gmail.com wrote:
>>>>
>>>> I believe that this is the third time that you've been asked to do
>>>> something about the amount of whitespace that you're sending to this
>>>> list.
>>>>
>>>> --
>>>> My fellow Pythonistas, ask not what our language can do for you, ask
>>>> what you can do for our language.
>>>>
>>>> Mark Lawrence
>>>>
>>>> _______________________________________________
>>>> Tutor maillist - Tutor at python.org
>>>> To unsubscribe or change subscription options:
>>>> https://mail.python.org/mailman/listinfo/tutor
>>>>
>>>>
>>>
>>> _______________________________________________
>> Tutor maillist - Tutor at python.org
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>>
>>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list