[Tutor] PYTHON 3.1

Dipo Elegbede delegbede at dudupay.com
Tue May 18 15:30:42 CEST 2010


thanks a lot.

i was almost going to abandon this python again out of frustration. i have
done it before but with you guys around, it would never happen again.

i have a pdf version of python programming for absolute beginners, could
anyone please help me with its accompaning CD content?

thanks as i anticipate responses.

regards.
On Tue, May 18, 2010 at 2:02 PM, James Reynolds <eire1130 at gmail.com> wrote:

>
>
> On Tue, May 18, 2010 at 8:40 AM, Dipo Elegbede <delegbede at dudupay.com>wrote:
>
>> Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit
>> (Intel)] on win32
>> Type "copyright", "credits" or "license()" for more information.
>> >>> print 'hello'
>> SyntaxError: invalid syntax (<pyshell#0>, line 1)
>> >>> print ('hello')
>> hello
>> >>>
>>
>> the above print is what i came across having installed python 3.0 and
>> trying to run the print command.
>> with previous versions, a print command takes the form
>> print 'parameter'
>> and the output is
>> parameter
>>
>> but with this new version it seems you need to put in brackets like:
>> print ('hello')
>> to get an output like:
>> hello
>>
>> please confirm this is a new syntax for print.
>> thank you.
>>
>> i will put up morte concerns as they arrive.
>>
>> thanks.
>> --
>> Elegbede Muhammed Oladipupo
>> OCA
>> +2348077682428
>> +2347042171716
>> www.dudupay.com
>> Mobile Banking Solutions | Transaction Processing | Enterprise Application
>> Development
>>
>> _______________________________________________
>> Tutor maillist  -  Tutor at python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>
> In python 3K print is a function.
>
> So, print('hello, world') is the correct syntax.
>
> You may find this article helpful:
> http://docs.python.org/py3k/whatsnew/3.0.html
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Elegbede Muhammed Oladipupo
OCA
+2348077682428
+2347042171716
www.dudupay.com
Mobile Banking Solutions | Transaction Processing | Enterprise Application
Development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100518/9fdd2316/attachment-0001.html>


More information about the Tutor mailing list