Try thinking what happens when you do this:
line = 'this is a reaaaaaaaaaaaaaaaaaaaallly long lineeeee\n'
first = line[:20]
second = line[20:]
print first
print second
.
.
.
.
.
.
.
.
.
.
Have you got it? The first would contain "this is a reaaaaaaaa" and the
second "aaaaaaaaaaaallly long lineeeee\n"
When you try to write to the file:
de.write(first)
de.write(second)
why isn't there a new line between the first and second?
Also, I think you should realize that with how you do it now, you may put
line breaks in between words. Better to split on space line.split(' ')
then ' '.join(first) + '\n' it together again.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor