3 ms·
Interesting to note that `print()` is supported out of the box--no need to `from __future__ import print_function`.
by weberc2 10y ago
Interesting to note that `print()` is supported out of the box--no need to `from __future__ import print_function`.
- jabagawee 10y agoThat's a print statement with an expression surrounded by parentheses. You can try it yourself in a Python 2 interpreter.
- emmelaich 10y agoSure, but that works without from `__future__ import print_function` in Python2 as well. But it gives different output; the print() prints a tuple whereas the function print() prints a newline. Also compare print(1) and print(1,2) with and without the __future__ import.
- weberc2 10y agoOh, weird. I could have sworn I've seen errors for using parens with `print` in Python 2...