输出
用print加上字符串,就可以向屏幕上输出指定的文字。比如输出’hello, world’,用代码实现如下:
>>> print 'hello, world'
print语句也可以跟上多个字符串,用逗号“,”隔开,就可以连成一串输出:
>>> print 'The quick brown fox', 'jumps over', 'the lazy dog'
The quick brown fox jumps over the lazy dog
p
1.输入与输出
python中输入与输出函数为:print、input
help()
帮助的使用:help()
help(print)
print(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)
Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-like o