Use list comprehension -- simpler, and just as easy to read as a for loop. my_string = "blah, lots , of , spaces, here " result = [x.strip() ...
確定! 回上一頁