字符串如何串联? [英] How can strings be concatenated?

查看:72
本文介绍了字符串如何串联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在python中连接字符串?

How to concatenate strings in python?

例如:

Section = 'C_type'

Sec _ 将其连接起来以形成字符串:

Concatenate it with Sec_ to form the string:

Sec_C_type


推荐答案

最简单的方法是

Section = 'Sec_' + Section

但是为了提高效率,请参见: https://waymoot.org/home/python_string/

But for efficiency, see: https://waymoot.org/home/python_string/

这篇关于字符串如何串联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆