<br><br><div class="gmail_quote">On Sun, Sep 9, 2012 at 10:41 AM, Ian Foote <span dir="ltr"><<a href="mailto:ian@feete.org" target="_blank">ian@feete.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 09/09/12 14:23, iMath wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
在 2012年3月26日星期一UTC+8下午7时45分26秒,<u></u>iMath写道:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I know the print statement produces the same result when both of these two instructions are executed ,I just want to know Is there any difference between print 3 and print '3' in Python ?<br>
</blockquote>
thx everyone<br>
</blockquote><br></div></blockquote><div> </div></div>Here's a future import though I used,so I can use the planned 3 with a 2x python version in the command line interpreter:<br><br>Microsoft Windows [Version 6.1.7600]<br>
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.<br><br>C:\Users\david>c:\python26\python.exe<br>Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on<br>win32<br>Type "help", "copyright", "credits" or "license" for more information.<br>
>>> exit()<br><br>C:\Users\david>c:\python27_64\python.exe<br>Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win<br>32<br>Type "help", "copyright", "credits" or "license" for more information.<br>
>>> import __future__<br>>>> x = 3<br>>>> y = '3'<br>>>> print(x)<br>3<br>>>> print(y)<br>3<br>>>><br>>>> type(x)<br><type 'int'><br>>>> type(y)<br>
<type 'str'><br><br>>>> z = '%i' % (3)<br>>>> type(z)<br><type 'str'><br>>>><br><br>In other words type(value), and find out the difference.<br>-- <br>Best Regards,<br>
<span style="font-family:arial,helvetica,sans-serif">David Hutto</span><br><i><b>CEO:</b></i> <u><a href="http://www.hitwebdevelopment.com" target="_blank">http://www.hitwebdevelopment.com</a></u><br><br>