标签:col 默认 span \n 拼接 class for range pytho
for i in range(10): print(i)
输出结果:
0
1
2
3
4
5
6
7
8
9
for i in range(10): print(i, end=" ")
输出结果:
0 1 2 3 4 5 6 7 8 9
参数end默认打印换行,即end = “\n”
sep用于做打印拼接
print("hello", "world", sep=":")
打印结果:
hello:world
python中的print(x, end=)和print(x, sep=)
标签:col 默认 span \n 拼接 class for range pytho
原文地址:https://www.cnblogs.com/jeavy/p/9158760.html