Python基础之字符串

Python基础之字符串,第1张

1.字符串拼接
https://blog.csdn.net/weixin_42257924/article/details/112512585
关键用法:print("%s,%s" % (str1, str2))
join方法:str_join2 = '-'.join(list1)

2.字符串格式化
https://pythontect.com/python-d-for-formatting-integer-inside-string/
关键用法:print("My age is %d" % (age) )

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/915861.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-16
下一篇2022-05-16

发表评论

登录后才能评论

评论列表(0条)

    保存