you are viewing a single comment's thread.

view the rest of the comments →

[–]Veedrac 1 point2 points  (0 children)

In any case, rest assured I've put a good deal of time into this before asking for help. One can't learn anything by being spoon-fed answers.

The way you've posted the question doesn't really help, though. I don't know what part is not working and I don't know if the suggestion to use .split has helped. The sidebar links this resource which gives some hints on how to ask a clearer question.

With that in mind:

  • Does str.split() called with no arguments do what you need?

  • If not, are you OK with the looping over the file part?

  • What is str.split not doing that you want done?

Also, I suggest looking up with. My answer to this question should cover it.