【发布时间】:2019-10-01 04:54:48
【问题描述】:
我是一个初学者,所以如果你对它的简单性感到不快,请跳过这个。
我不知道如何编写一个接受两个参数(名称和课程)并打印的函数: Welcome "name" to the "course" bootcamp。
def greeting('name', 'course'):
print (welcome,'name', to, the, 'course')
我希望能够打印 Welcome Stacie to the python bootcamp!
【问题讨论】:
-
欢迎来到 SO!变量包含字符串,而不是是字符串:删除变量周围的所有引号并将它们放在字符串文字周围,如
"welcome"和"to","the"。
标签: python string function arguments