python——print、注释
·
1.end使用
连接两个print函数,变到同行输出,end的内容是两个print的连接内容。
print("hello",end=" look ")
print("123")
结果

2.sep使用
同一个print有多个“”内容时,“,”的作用是为输出间为空格,sep的内容代替空格。
print("Hello World!","asda","qwd",sep="/")

3.注释
①#:单行注释。
②“““ ”””或者''' ''':多行注释。
③ctrl+/:添加注释/取消注释,使用的是单行注释符#,可以进行多行的注释。
更多推荐



所有评论(0)