AE
Size: a a a
AE
БГ
old_print = print
print_fd = open(...)
def print(*args, **kwargs):
if 'file' in kwargs: return old_print(*args, **kwargs)
else: return old_print(*args, file=print_fd, **kwargs)
R3
old_print = print
print_fd = open(...)
def print(*args, **kwargs):
if 'file' in kwargs: return old_print(*args, **kwargs)
else: return old_print(*args, file=print_fd, **kwargs)
БГ
БГ
AE
БГ
py3
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.
AE
R3
БГ
БГ
БГ
py3
help(input)
Help on built-in function input in module builtins:
input(prompt=None, /)
Read a string from standard input. The trailing newline is stripped.
The prompt string, if given, is printed to standard output without a
trailing newline before reading input.
If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
On *nix systems, readline is used if available.
БГ
БГ
БГ
БГ
R3
R3
БГ