By Dolphin , 20150730
Title :
编写一个程序,获取用户输入的一条信息,然后将其倒序输出。
Code:
# Reverse Word # By Dolphin,20150730 # word = input("Please Enter a word :") # creat a jumble word jumble = "" position = len(word) - 1 while word and position != -1 : jumble += word[position] position -= 1 print(jumble) input("\n Enter the any key to exit !")
本文出自 “西伯利亚狼026” 博客,请务必保留此出处http://1429223.blog.51cto.com/1419223/1680139
原文地址:http://1429223.blog.51cto.com/1419223/1680139