Python: print () function

description

print () method for printing out, a function is the most common.

print 在 Python3.x 是一个函数,但在 Python2.x 版本不是一个函数,只是一个关键字。

grammar

The following is the syntax print () method:

print(*objects, sep=’ ‘, end=’\n’, file=sys.stdout)

parameter

objects -- 复数,表示可以一次输出多个对象。输出多个对象时,需要用 , 分隔。
sep -- 用来间隔多个对象,默认值是一个空格。
end -- 用来设定以什么结尾。默认值是换行符 \n,我们可以换成其他字符串。
file -- 要写入的文件对象。

return value

no.

Guess you like

Origin blog.csdn.net/weixin_44523387/article/details/93370754