- Messaggio originale -
> Da: "Valerio Pachera"
> A: "Tutor Python"
> Inviato: Giovedì, 28 febbraio 2019 13:05:27
> Oggetto: Re: [Tutor] Remove soft line break
> ...
> I noticed that the end of file doesn't get preserve if I create a
Valerio Pachera wrote:
[Me:]
>> def merge_lines(lines):
>> lines = (line.rstrip("\n") for line in lines)
>> accu = [next(lines)]
>> for line in lines:
>> if line.startswith(" "):
>> accu.append(line[1:])
>> else:
>> yield "".join(accu) + "\n"
, 4 febbraio 2019 20:23:59
Oggetto: Re: [Tutor] Remove soft line break
Valerio Pachera wrote:
>
> I have a file with row that split at the 80th character.
> The next row start with a blank space, meaning that i part of the previous
> row.
>
> Example:
>
> Lorem ipsum dolor si
- Messaggio originale -
> Da: "Valerio Pachera"
> A: "Tutor Python"
> Inviato: Giovedì, 28 febbraio 2019 13:05:27
> Oggetto: Re: [Tutor] Remove soft line break
>...
> It works as expected but there's a thing I've to understand about the end o
Valerio Pachera wrote:
>
> I have a file with row that split at the 80th character.
> The next row start with a blank space, meaning that i part of the previous
> row.
>
> Example:
>
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam non justo
> enim. Viv
> amus dapibus quis neque
On 2/4/19 10:13 AM, Valerio Pachera wrote:
>
> I have a file with row that split at the 80th character.
> The next row start with a blank space, meaning that i part of the previous
> row.
>
> Example:
>
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam non justo enim.
> Viv
>
I have a file with row that split at the 80th character.
The next row start with a blank space, meaning that i part of the previous row.
Example:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam non justo enim. Viv
amus dapibus quis neque vitae ornare. Pellentesque at pharetra