[Tutor] Printing

Alfred Milgrom fredm@smartypantsco.com
Sat Feb 15 00:38:01 2003


 > I also found just now that I can do it as follows:

 >>> import string
 >>> x=['h','e','l','l','o']
 >>> text = string.join(x,"")
 >>> print text
hello

You actually now don't need to import string with the more recent versions 
of Python.

You can do it as
 >>> x=['h','e','l','l','o']
 >>> print ''.join(x)
hello

Best of luck,
Fred Milgrom