-1

I must convert infile into lines of 260 characters and than remove all the content before (including the character) '_'

I have been looking around for hours now and found a way to convert to 260 characters.

lines = infile.readlines()
[line[i:i+n] for i in lines(0, len(line), 640)]

and found a lot of examples wrt removing characters from string or all characters after an argument.

Please help me out here...

ahmet
  • 4,955
  • 11
  • 39
  • 64
user2343368
  • 403
  • 1
  • 4
  • 6
  • If you want to manipulate whole words instead of characters only, have a look at `textwrap`: http://docs.python.org/2/library/textwrap.html – eumiro May 02 '13 at 14:17

1 Answers1

0
lines = infile.readlines()
[line[i:i+n] for i in lines(0, len(line), 640)]
line.split("_")[1]
angelo
  • 1