string = 'ABC DEF GHI JK LMNO P' list = string.split() print(list)
输出:
ABC DEF GHI JK LMNO P
.split 在拆分字符串时忽略单个空格?
.split