sep=''是什么意思
print("正面:", heads, "次", sep="")中sep=''有什么用? https://fishc.com.cn/forum.php?mod=viewthread&tid=141463&highlight=print 先来看下官方解释,sep:分割值与值,默认是一个空格
end:附件到最后一个值,默认是一个新行
打印:#分割值,打印最后是@@加一个空行
print("I'm a tester.","hello python","good",sep='#',end='@@\n')
print('---------------')
print("I'm a tester.","hello python\n","good",sep='#',end='@@\n')
输出结果:
I'm a tester.#hello python#good@@
---------------
I'm a tester.#hello python
#good@@
页:
[1]