【发布时间】:2013-12-21 10:20:20
【问题描述】:
我是 python 新手,现在学习基础知识。我尝试了以下 def 函数。但它表明错误。谁能告诉我我在哪里犯了语法错误。
(我用正确的缩进写了它。但我粘贴时Stakoverflow窗口没有显示)
# This will test the reverse function of the program
def rev(text) :
text = input()
return text [::-1]
print("Please Enter a word")
input()
rev(text)
input() # This is to avoid the screen closing immediately after executing the
# program
【问题讨论】:
标签: python python-3.x function