想问这样怎么用\n换行
Topic source这个是python中print的定义:
def print(*values: Any, sep: str = ' ', end: str = '\n', file: IO[str] = None, flush: bool = False) Inferred type: (values: Tuple[Any, ...], sep: str, end: str, file: Optional[IO[str]], flush: bool) -> None
API文档如下:
Prints the values to a stream, or to sys.stdout by default. Optional keyword arguments: file: a file-like object (stream); defaults to the current sys.stdout. sep: string inserted between values, default a space. end: string appended after the last value, default a newline. flush: whether to forcibly flush the stream. External documentation: http://docs.python.org/3.7/library/builtins.html#builtins.print
- 所以sep是每个值之间的分隔符。
- 1
我我我Metanoia
print(n,f,s1,s2,s3,s4)