PAT-B 1009. 说反话(python)

用到list的reverse方法,感觉是比C++写起来快...


源码:

if __name__ == "__main__" :
    sentence = raw_input().split(' ')
    sentence.reverse()
    for item in sentence :
        print item,

你可能感兴趣的:(python,list,reverse,PAT-B)