Python 2.7.1 (r271:86832, Jan 13 2011, 22:08:21) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print('hello', end='') File "<stdin>", line 1 print('hello', end='') ^ SyntaxError: invalid syntax >>> from __future__ import print_function >>> print('hello', end='') hello>>>
HTH. On 16-Jan-2011, at 2:04 AM, Karim wrote: > > IN 3.1 for print(): > > >>> print('hello', end =' ') > hello>>> > > It suppress the newline character. > > > On 01/15/2011 07:05 PM, Emile van Sebille wrote: >> On 1/15/2011 9:35 AM Bill DeBroglie said... >>> Twice in two days...! >>> >>> Using Mac OS X 10.5.8 and Python 2.7.1 but am following a book which is >>> using Python 3.1. The author uses the end parameter >> >> What's an 'end' parameter? >> >> Emile >> >>> in numerous programs >>> but this doesn't seem to translate to 2.7. Any advice as to how I can >>> specify the final string of the print function? >>> >>> Thank you, >>> bdb >>> _______________________________________________ >>> Tutor maillist - Tutor@python.org >>> To unsubscribe or change subscription options: >>> http://mail.python.org/mailman/listinfo/tutor >>> >> >> >> _______________________________________________ >> Tutor maillist - Tutor@python.org >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor