[Tutor] Issues In Terminal
waynejwerner at gmail.com
Tue Sep 28 16:08:56 CEST 2010
On Tue, Sep 28, 2010 at 5:02 AM, Alan Gauld <alan.gauld at btinternet.com>wrote:
> "Marc Tompkins" <marc.tompkins at gmail.com> wrote
> The parentheses are optional in 2.6, mandatory in 3. In 2.6, print and
>> print() are alternate ways to invoke the print statement
> Not strictly true. They often give the same results but not always,
> see a recent thread on this. In particular
> print ('a','b')
> is quite different to
> print 'a','b'
> But that shouldn't be an issue for 'hello world'
And of course if you're on 2.6+ you can always add
from __future__ import print_function
and that will help prepare you for the eventual migration to 3+
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor