
El jue., 27 jun. 2019 a las 11:51, <dan@bauman.space> escribió:
excellent and extraordinarily obvious
Thanks for the pointer.
a bit unfortunate that old docs for a module that doesn't seem to exist in py3 with less clear but still correct words is still the top google result for python string strip.
https://docs.python.org/2/library/string.html#string.lstrip
string.lstrip(s[, chars])¶
Return a copy of the string with leading characters removed. If chars is omitted or None, whitespace characters are removed. If given and not None, chars must be a string; the characters in the string will be stripped from the beginning of the string this method is called on.
That function actually also behaves like str.lstrip() does in Python 3:
string.lstrip('abcd', 'ba') 'cd'
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/EL26KYH6...