Re: Any better way for this removal? [typo correction]
On 2020-11-07 10:51, Tim Chase wrote: > from string import ascii_lowercase > text = ",".join(ascii_lowercase) > to_throw_away = 5 [derp] For obvious reasons, these should be s/\/to_throw_away/g To throw away the trailing N delimited portions: > new_string = text.rsplit(',', n)[0] new
typo correction
Now I see that I wrote a quite unreadable typo: "unterd". I meant "untared". Peter Tomcsanyi -- https://mail.python.org/mailman/listinfo/python-list