在Python中,您将使用字符串插值
"Hello %s" % user_name_function()
Run Code Online (Sandbox Code Playgroud)
或字符串格式化
"Hello {0}".format(user_name_function())
Run Code Online (Sandbox Code Playgroud)
后者在Python 2.6或更高版本中可用.
另请注意,按照惯例,您不要在Python中使用CamelCase作为函数名称(CamelCase仅用于类名 - 请参阅PEP 8).