tobiah <[EMAIL PROTECTED]> writes:
> assuming that the 'lines' have newlines at the end,
No need to assume; tell the string what you want.
' '.join(line1.rstrip('\n'), line2)
--
\ "Nothing is so common as to imitate one's enemies, and to use |
`\their weapons." -- Voltair
[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
On 26 Sep 2006 03:16:25 -0700, [EMAIL PROTECTED]
<[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
>
als
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
--
http://mail.python.org/mailman/listinfo/python-list
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 = "l
[EMAIL PROTECTED] enlightened us with:
> hi
> what is the python way to concat 2 lines eg
concated = line1 + line2
Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
--
http://mail.python.org/mailman/listinfo/python-list