On Sun, Jul 20, 2014 at 7:40 PM, Martin S <shieldf...@gmail.com> wrote: > games[c].rstrip('\n') #This does nothing, expected to remove \n > > While all records in the remaining list now are valid, all also still > have "\n" at the end. What did I miss here?
Strings don't change. When you call rstrip(), it returns a new string which is the stripped value. You'll need to slot that back in: games[c] = games[c].rstrip('\n') However, there may be a better way to do this - possibly a cleaner parser. ChrisA -- https://mail.python.org/mailman/listinfo/python-list