Elliot Edmunds <[email protected]> added the comment:
Not sure how helpful it would be to have the re.sub expressions for lstrip and rstrip, but I think it would look like: l_stripped = re.sub(r'^\s*', '', foo) r_stripped = re.sub(r'\s*$', '', foo) ---------- nosy: +Elliot Edmunds Added file: https://bugs.python.org/file47769/whitespace_regex.py _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue25433> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
