You can just use List-comprehension. >>> [x.replace('!', '').replace('?','') for x in list_names] ['sdf', 'sdfds', 'afsafsa', 'afasf'].
確定! 回上一頁