在Python中为参数赋值

时间:2013-04-24 10:33:14

标签: python parameters arguments

>>> import sys
>>> def hello(name):
    name='Hello, ',name,' !'
    print name

这是我的代码。如何为参数“name”分配值?

1 个答案:

答案 0 :(得分:1)

你的意思是

input = "whatever"
hello(input)