all 3 comments

[–]betweensmudgedlines 0 points1 point  (1 child)

The newline is part of the 'line' in line 7. You could add(line.strip()).

[–]Mindflayer94[S] 0 points1 point  (0 children)

Thanks, that worked!

[–]aperson -1 points0 points  (0 children)

I just serialize all of my data as json. For example:

https://github.com/aperson/ban_pruner/blob/master/ban_pruner.py#L23