题解 | #单词倒排#
单词倒排
https://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
strs = input()
new_list = []
for i in strs:
if not i.isalpha():
strs = strs.replace(i,' ')
new_list = strs.split()
print(' '.join(reversed(new_list)))
单词倒排
https://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
strs = input()
new_list = []
for i in strs:
if not i.isalpha():
strs = strs.replace(i,' ')
new_list = strs.split()
print(' '.join(reversed(new_list)))
相关推荐
查看5道真题和解析