【发布时间】:2014-05-19 15:13:00
【问题描述】:
我正在使用 Python 3.3。我有这个字符串:
"Att education is secondary,primary,unknown"
现在我需要拆分最后三个单词(可能有更多或只有一个)并创建所有可能的组合并将其保存到列表中。喜欢这里:
"Att education is secondary"
"Att education is primary"
"Att education is unknown"
最简单的方法是什么?
【问题讨论】:
标签: python regex list python-3.x