y总算法基础课双指针例子用python实现
a = list(input())
i, j = 0, 0
while i < len(a):
while j < len(a) and a[j] != ' ':
j += 1
k = i
while k < j:
print(a[k], end='')
k += 1
print()
j += 1
i = j
输入
abc def ghi
输出
abc
def
ghi