[Tutor] print in py3

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Dec 23 04:47:15 CET 2013


On 22/12/2013 17:42, Keith Winston wrote:
>
> On Sun, Dec 22, 2013 at 6:00 AM, <tutor-request at python.org
> <mailto:tutor-request at python.org>> wrote:
>
>     But in Python 2, the parentheses aren't part of the function call,
>     because print isn't a function. So what do the brackets do? They are
>     used for *grouping* terms together.
>
>     In the first line, the brackets group variable a, comma, myExample[a]
>     together. What does the comma do? It creates a tuple.
>
>
>
> Sorry my question was rambling and imprecise. Thanks, I never would have
> guessed the tuple issue, though it makes perfect sense the second you
> say it.
>
> The other part of my question was: how did you find that PEP? I started
> looking, and it seemed like I could have taken hours, even though I sort
> of knew what I was looking for. You must have had a reasonably efficient
> search strategy/tool.
>

I'm there so often I've got the PEP index book marked :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list