[EMAIL PROTECTED] wrote: > hi > 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 >
assuming that the 'lines' have newlines at the end, maybe: ' '.join(line1[:-1], line2) or ' '.join(line.replace('\n', ''), line2) Which covers the case of no newline at the end as well. -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list