首页 > 编程 > Python > 正文

python中从字符串中获得单词列表

2019-11-08 18:23:37
字体:
来源:转载
供稿:网友

最简单的方式如下:

#通过空格来进行分词sentence='hello world'Words=sentence.split(" ")PRint(words)
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表