剑指offer python版 翻转单词顺序

def aa(string):
    if not string:
        return False
    a=string.split()
    
    return ' '.join(a[::-1]) 
        
     
print(aa('I am a engineer.'))  

 

posted @ 2018-10-29 14:04  findtruth123  阅读(167)  评论(0编辑  收藏  举报