c用函数调用的方式写一个函数将2个字符串连接成一个字符串。使用字符串
的拼接符号"+")
def concat_strings(str1, str2): return str1 + str2
测试代码
print(concat_strings("Hello", "World")) # 输出:HelloWorld
原文地址: https://www.cveoy.top/t/topic/b4qf 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
的拼接符号"+")
def concat_strings(str1, str2): return str1 + str2
print(concat_strings("Hello", "World")) # 输出:HelloWorld
原文地址: https://www.cveoy.top/t/topic/b4qf 著作权归作者所有。请勿转载和采集!