Re: How to replace space in a string with \n
^Bart
gabriele1NOSPAM at hotmail.com
Thu Jan 31 05:50:29 EST 2019
> You coulde use »sub« from the module »re«, then.
> (The Python Library Reference, Release 3.8.0a0 -
> 6.2 re - Regular expression operations)
We're using 3.7.2 :\
> Otherwise,
>
> Write a loop that takes the first character from
> the source and appends it to a new string until
> there is no more character left in the source.
>
> You now should have written a loop that copies
> the string character by character.
>
> Then it is easy to modify the loop a little bit
> to complete the exercise.
I'll ask it to the teacher this afternoon, thanks for your reply! :)
^Bart
More information about the Python-list
mailing list