在Python中为参数赋值

在Python中为参数赋值,python,parameters,arguments,Python,Parameters,Arguments,这是我的密码。如何为参数“name”赋值?您的意思是什么 >>> import sys >>> def hello(name): name='Hello, ',name,' !' print name 您需要阅读Python教程defhello(name):打印“hello”,nameLol yes。我在输入字符串时没有使用倒逗号。我写的是-hello(World)而不是hello('World')来连接单词,用+而不是,。当我用“,”@us

这是我的密码。如何为参数“name”赋值?

您的意思是什么

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

您需要阅读Python教程
defhello(name):打印“hello”,name
Lol yes。我在输入字符串时没有使用倒逗号。我写的是-hello(World)而不是hello('World')来连接单词,用
+
而不是
。当我用“,”@user2278992阅读教程并不是最糟糕的主意。
input = "whatever"
hello(input)