题解 | #单词倒排#
单词倒排
https://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
let str = readline() let re = new RegExp('[^a-z]+','gi') str = str.replace(re,' ').trim().split(' ').reverse().join(' ') print(str)
单词倒排
https://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
let str = readline() let re = new RegExp('[^a-z]+','gi') str = str.replace(re,' ').trim().split(' ').reverse().join(' ') print(str)
相关推荐