SyntaxFix
Write A Post
Hire A Developer
Questions
>>> my_list = ['this\n', 'is\n', 'a\n', 'list\n', 'of\n', 'words\n'] >>> map(str.strip, my_list) ['this', 'is', 'a', 'list', 'of', 'words']