这里是最全面的 python 字符串拼接总结,赶快收藏!

在 Python 中字符串连接有多种方式,这里简单做个总结,应该是比较全面的了,方便以后查阅。 加号连接 第一种,通过+号的形式: >>> a, b ='hello',' world' >>> a + b 'hello world' 逗号连接 第二种,通过,逗号的形式: >>> a, b ='hello',' world' >>> print(a, b) hello world 但是,使用,逗号形
相关文章
相关标签/搜索