您好,我正在尝试删除字符“+”
>>> a = ['eggs+', 'I don't want to remove this ', 'foo', 'spam+', 'bar+']
>>> a = [i[:-1] for i in a if i.ends with('+')]
>>> a
['eggs', 'spam', 'bar']
>>>
为什么“我不想删除这个”之类的东西会被删除,我该如何删除“+”并留下其他所有东西
>>>['eggs', 'I don't want to remove this ', 'foo', 'spam', 'bar']