On 2022-10-29 19:21, Bernard LEDRU wrote:
Hello,
https://docs.python.org/3/library/stdtypes.html#string-methods
str.replace(old, new[, count])¶
Return a copy of the string with all occurrences of substring old
replaced by new. If the optional argument count is given, only the first
count occurr
I believe you would do well to print a, before trying to transform it into
something else.
'\2' is chr(2).
'\a' is the bell character, and is unprintable.
'\_' is two characters though.
On Sat, Oct 29, 2022 at 2:12 PM Bernard LEDRU
wrote:
> Hello,
>
> https://docs.python.org/3/library/stdtypes.
Better to use raw strings whenever backslashes are involved.
On 10/29/2022 2:21 PM, Bernard LEDRU wrote:
Hello,
https://docs.python.org/3/library/stdtypes.html#string-methods
str.replace(old, new[, count])¶
Return a copy of the string with all occurrences of substring old
replaced by new. If
> On 29 Oct 2022, at 22:14, Bernard LEDRU wrote:
>
> Hello,
>
> https://docs.python.org/3/library/stdtypes.html#string-methods
>
> str.replace(old, new[, count])¶
> Return a copy of the string with all occurrences of substring old replaced by
> new. If the optional argument count is given,
Hello,
https://docs.python.org/3/library/stdtypes.html#string-methods
str.replace(old, new[, count])¶
Return a copy of the string with all occurrences of substring old
replaced by new. If the optional argument count is given, only the first
count occurrences are replaced.
Attention when the