Is there any difference between print 3 and print '3' in Python ?
Colton Myers
colton.myers at gmail.com
Mon Mar 26 10:43:59 EDT 2012
> 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 ?
Sure there is. The first converts the integer 3 to a string ("3"), the second just prints the given string "3". Does that make sense?
--
Colton Myers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120326/30cb2aca/attachment-0001.html>
More information about the Python-list
mailing list