[Tutor] Simple Python Problem
Bill Allen
wallenpb at gmail.com
Mon Sep 6 20:31:18 CEST 2010
>
>
> Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
>> on win32 Type
>> "copyright", "credits" or "license()" for more information.
>>
>>> ================================ RESTART ================================
>>>>>
>>>> What is your name? Keith
>>
>
> I think there is a trick in V2.7 to make it act more like v3 but someone
> else will need to tell you what it is... :-)
>
>
Other than changing the input() to raw_input() for Python 2 compatibility,
the following statement could be added to the beginning of the program to
allow your Python 2 program to use the Python 3 style print function.
from __future__ import print_function
-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100906/5bfdc870/attachment.html>
More information about the Tutor
mailing list