小编use*_*650的帖子

为什么不打印此函数顶部的字符串?

我在教程中遇到了以下函数.当我调用该函数时,"This prints a passed string into this function"不打印.为什么函数在调用时不打印这段文本?

def printme(str):
   "This prints a passed string into this function"
   print str
   return

# Now you can call printme function
printme("I'm first call to user defined function!")
printme("Again second call to the same function")
Run Code Online (Sandbox Code Playgroud)

python docstring

4
推荐指数
2
解决办法
127
查看次数

标签 统计

docstring ×1

python ×1