On 26 Sep 2006 03:16:25 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > what is the python way to concat 2 lines eg > > line 1 with some text > line 2 with some text > > i want to bring line 2 up , such that i get one whole string. > > line 1 with some text line 2 with some text
line1 = "line 1 with some text" line2 = "line 2 with some text" # Simplest way: line3 = line1 + line2 # More general - joining a sequence of strings, with delimiter lines = [line1, line2] line3 = ", ".join(lines) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list