题解 | #单词倒排#
单词倒排
http://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
import re
string = input()
result = re.split(r'\W', string)
result.reverse()
for i in result:
if i !='':
print(i,end=' ')
单词倒排
http://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
import re
string = input()
result = re.split(r'\W', string)
result.reverse()
for i in result:
if i !='':
print(i,end=' ')
相关推荐