Heh,

Cut 'im some slack there Bob, I only just figured out that line[:1] ==
line[0]...

On 10/28/05, bob <[EMAIL PROTECTED]> wrote:
> At 01:42 PM 10/27/2005, Adam wrote:
> > >if line[:1] == "1":
> >
> >This line won't work because you're getting the first 2 characters from
> >the line
>
> Oh? Did you test that? When I do that I get 1 character. Why? Because
> slicing goes UP TO the 2nd argument.
>  >>> 'abc'[:1]
> 'a'
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to