PTA BASIC 1009.说反话

半腔热情 提交于 2020-03-09 20:30:49

原题目链接


题解与感想

 本来应该是用C写才有点数据结构的味道,不过正好这段时间复(yu)习python,遂用python写的

源码

sentence=input()

new_sentence=''
for word in sentence.split()[::-1]:
    new_sentence+=word
    new_sentence+=' '
    
print(new_sentence.strip())
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!