题解 | #句子逆序#
句子逆序
http://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
xin = []
if ' ' in x:
for danci in x[::-1].split(' '):
danci1= danci[::-1]
xin.append(danci1)
print(' '.join(xin))
else:
print(x)
句子逆序
http://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
xin = []
if ' ' in x:
for danci in x[::-1].split(' '):
danci1= danci[::-1]
xin.append(danci1)
print(' '.join(xin))
else:
print(x)
相关推荐