例如,我想:
texta = text.lower() textacopy1 = texta.replace(string.punctuation, ' ') textacopy2 = textacopy1.split(' ')
有没有更简洁的方法来做这个而不必分配多个变量?
如果2.7和3.x之间存在差异,我更倾向于3.x解释.
python python-2.7 python-3.x
python ×1
python-2.7 ×1
python-3.x ×1