.. _bad-str-strip-call: bad-str-strip-call / E1310 ========================== **Message emitted:** ``Suspicious argument in %s.%s call`` **Description:** *The argument to a str.{l,r,}strip call contains a duplicate character,* **Problematic code:** ``hello_world.py``: .. literalinclude:: /data/messages/b/bad-str-strip-call/bad/hello_world.py :language: python ``remove_abc_from_both_side.py``: .. literalinclude:: /data/messages/b/bad-str-strip-call/bad/remove_abc_from_both_side.py :language: python **Correct code:** ``hello_world.py``: .. literalinclude:: /data/messages/b/bad-str-strip-call/good/hello_world.py :language: python ``remove_abc_from_both_side.py``: .. literalinclude:: /data/messages/b/bad-str-strip-call/good/remove_abc_from_both_side.py :language: python **Additional details:** A common misconception is that ``str.strip('Hello')`` removes the *substring* ``'Hello'`` from the beginning and end of the string. This is **not** the case. From the `documentation `_: > The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped Duplicated characters in the ``str.strip`` call, besides not having any effect on the actual result, may indicate this misunderstanding. **Related links:** - Documentation: `str.strip([chars]) `_ Created by the `string `__ checker.