Default parameter of the print () function of python3.x
Python beginners, write a 99 multiplication table,
For I in range (1, 10): for j in range (1, I + 1): print (j, 'x', I, '= ', j * I, end = '\ t') print (' \ n ')
Here, end = '\ t' indicates that the end parameter is not added to the end of a TAB. Therefore, the line feed is automatically generated each time the end line is output and the second line is output.
>>> Help (print) Help on built-in function print in module builtins: 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 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.
Sep indicates that the value and value are separated by spaces by default, and end indicates the default line feed at the end. In python2.X, you only need to add a comma after print.