On Jun 13, 9:38 am, Phillip B Oldham <[EMAIL PROTECTED]> wrote:
> Thanks guys. Those comments are really helpful. The odd semi-colon is
> my PHP background. Will probably be a hard habbit to break, that
> one! ;) If I do accidentally drop a semi-colon at the end of the line,
> will that cause any weird errors?
>
> Also, Chris, can you explain this:
> a, b = line.split(': ')[:2]
>
> I understand the first section, but I've not seen [:2] before.That's slicing at work. What it is doing is only taking the first two elements of the list that is built by the line.split. -- http://mail.python.org/mailman/listinfo/python-list
