Re: [Tutor] Remove soft line break

2019-03-16 Thread Valerio Pachera
- 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

Re: [Tutor] Remove soft line break

2019-03-01 Thread Peter Otten
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"

Re: [Tutor] Remove soft line break

2019-02-28 Thread Valerio Pachera
, 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

Re: [Tutor] Remove soft line break

2019-02-28 Thread Valerio Pachera
- 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

Re: [Tutor] Remove soft line break

2019-02-04 Thread Peter Otten
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

Re: [Tutor] Remove soft line break

2019-02-04 Thread Mats Wichmann
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 >

[Tutor] Remove soft line break

2019-02-04 Thread Valerio Pachera
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