function_arguments.py

来自「python编程很好的入门材料,包括讲义和源码.」· Python 代码 · 共 16 行

PY
16
字号
#-------------------------------------------------------------------------------
# Define a function that takes one argument so we can customize our
# "Game Over!" message.
#-------------------------------------------------------------------------------

def printGameOver( playersName ):
    print "Game Over... " + playersName + "!"

# Now, lets call our new function and pass in some player names...

printGameOver( "camper_boy" )
printGameOver( "Haxxor" )
printGameOver( "c1pher" )

raw_input( "\nPress Enter to exit..." )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?