Oct-04-2020, 01:07 AM
(Oct-03-2020, 09:48 PM)Larz60+ Wrote: can you please explain exactly what is being stripped?
This looks like it might be greatly simplified.
Well, you can install a debugger and follow the example,
it is always a good way to see what happen.
But the function is easy to follow.
and do ... "Stripping a bunch of characters from a string."
def strStripAll(s,ss): return ''.join([c for c in s if c not in ss])is easy to follow ...
with all characters in s chose those that are not in ss
with that result list rebuild a string,
so you effectively remove all caracters in ss from the string s.
