redstone-c...@163.com wrote:

> 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 ?

The question you really wanted to ask is: under what circumstances will the 
two statements produce different output? Here's what I found:

$ PYTHONIOENCODING=hex python -c'from __future__ import unicode_literals
print 3'
3
$ PYTHONIOENCODING=hex python -c'from __future__ import unicode_literals 
print "3"'
33
$

:)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to