>i. e. a character after a 'carriage return' ('\r') overwrites part of the
>string which therefore doesn't seem to grow. Try
>
>print repr(data[:51])
>
>to see what's really in your data string.
>
>
Yes, that was it! Thanks for you help. I thought it will be something
obvious.
The server retu
David Stockwell wrote:
> Indeed,Are you writing a new book?
>
> http://www.amazon.com/exec/obidos/ASIN/1563052857/wildwierdmathpro
I'm not, but thanks for asking. :-)
--
http://mail.python.org/mailman/listinfo/python-list
>
>I assume the code snippets are exact copy/paste so this is not a typo
>(like print data[51:] ...) - and I can't reproduce it here... even with
>a string of 20381 characters.
>
>
Yes, they were cut out. type(data) returns ''.
The data was downloaded from a website, it starts with
http://www.w
org
>Subject: Very dumb question
>Date: Wed, 12 Oct 2005 15:39:29 +0200
>I have a program with this code fragment:
>
> print len(data)
> print data[:50]
> raise SystemExit
>
>This prints:
>
>20381
>
>But if I change 50 to 51
>
> print len(d
Laszlo Zsolt Nagy wrote:
> I have a program with this code fragment:
>
> print len(data)
> print data[:50]
> raise SystemExit
>
> This prints:
>
> 20381
>
> But if I change 50 to 51
>
> print len(data)
> print data[:51]
> raise SystemExit
>
> then it prints
>
> 20381
> !DOCTYPE html PUBLIC
Laszlo Zsolt Nagy wrote:
> I have a program with this code fragment:
>
>print len(data)
>print data[:50]
>raise SystemExit
>
> This prints:
>
> 20381
>
> But if I change 50 to 51
>
>print len(data)
>print data[:51]
>raise SystemExit
>
> then it prints
>
> 20381
> !DO
Laszlo Zsolt Nagy wrote:
> Laszlo Zsolt Nagy wrote:
>
>> I have a program with this code fragment:
>>
>>print len(data)
>>print data[:50]
>>raise SystemExit
>>
>> This prints:
>>
>> 20381
>> >
>> But if I change 50 to 51
>>
>>print len(data)
>>print data[:51]
>>raise System
Laszlo Zsolt Nagy wrote:
>I have a program with this code fragment:
>
>print len(data)
>print data[:50]
>raise SystemExit
>
>This prints:
>
>20381
>
>But if I change 50 to 51
>
>print len(data)
>print data[:51]
>raise SystemExit
>
>then it prints
>
>20381
> !DOCTYPE html PU
I have a program with this code fragment:
print len(data)
print data[:50]
raise SystemExit
This prints:
20381
http://mail.python.org/mailman/listinfo/python-list