学习笔记(05):Python 面试100讲(基于Python3.x)-请详细描述print函数的用法

立即学习:https://edu.csdn.net/course/play/26755/340118?utm_source=blogtoedu

print

1.用字符分隔输出的字符串

print(”a","b",sep=",")

2.不换行

print("hello",end=" ")

print("world")

hello world

3.格式化

s='123'

x=len(s)

print("the length of %s is %d" %(s,x)

发布了26 篇原创文章 · 获赞 2 · 访问量 293

猜你喜欢

转载自blog.csdn.net/qq_35504363/article/details/104206985