zoukankan
html css js c++ java
Python天天美味(7) 连接字符串(join %)(转)
join 方法用于连接字符串数组
s
=
[
'
a
'
,
'
b
'
,
'
c
'
,
'
d
'
]
print
''
.join(s)
print
'
-
'
.join(s)
输出结果:
abcd
a-b-c-d
使用 % 连接多个变量
a
=
'
hello
'
b
=
'
python
'
c
=
1
print
'
%s %s %s %s
'
%
(a, b, c, s)
输出结果:
hello python 1 ['a', 'b', 'c', 'd']
查看全文
相关阅读:
java 反射 处理 空值
jquery之data()
jquery里面的$.each()方法
Normalize.css 样式作用,及使用方法
robots.txt、humans.txt、.editorconfig、.gitignore、LICENSE.txt、README.md、CHANGLOG.md
常见的js算法
javascript设计模式详解
ES6的相关信息
轮播图插件
webstrom随手笔记
原文地址:https://www.cnblogs.com/qq78292959/p/3066638.html
最新文章
浅拷贝和深拷贝
Javascript实现对象的继承
Minimum Window Substring
Insert Interval
Palindrome Number
Reverse Integer
Combinations
Subsets
Search a 2D Matrix
Search Insert Position
热门文章
Search for a Range
Opencv Cookbook阅读笔记(四):用直方图统计像素
spring boot 加载配置 文件
spring boot中 启用aspectj
关闭 chrome 自动填充
js 返回 差 集
ueditor chrome bug
maven 设置 编码 ,jdk 版本
java Response 设置中文编码
adminLte 解决菜单栏 bug
Copyright © 2011-2022 走看看