Tag: 文字分词

将string转换为字列表?

我试图将string转换为使用Python的单词列表。 我想采取如下的东西: string = 'This is a string, with words!' 然后转换成这样的东西: list = ['This', 'is', 'a', 'string', 'with', 'words'] 注意省略标点和空格。 什么是最快的方式去做这个?