7 Aug
2016
7 Aug
'16
8:38 a.m.
On 08/05/2016 03:37 AM, Perry Rothenbaum wrote:
I am learning Python 3.5. I’m following your examples in section 3 “An informal introduction to Python” tutorial. The “print” statement is shown without parenthesis in the tutorial and in Python 3.5 it only works with parenthesis. In fact, if I try to type it as you have it shown, I get an error and am being told to add parenthesis. When I add parenthesis it works.
Hi Perry, please take care which version of the tutorial you're reading: there are separate versions for Python 2 (where "print" is a statement that doesn't require parens) and Python 3 (where it does, as you noticed). The links are https://docs.python.org/2/tutorial/ and https://docs.python.org/3/tutorial/ cheers, Georg