Try this:

lst = [("aaaa8"),("bb8"),("ccc8"),("dddddd8")]
print([s.strip('8') for s in lst]) # remove the 8 from the string borders
print([s.replace('8', '') for s in lst]) # remove all the 8s 
Answer from Jochen Ritzel on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-remove-given-character-from-strings-list
Python | Remove given character from Strings list - GeeksforGeeks
April 14, 2023 - If the list is not empty, remove the character from the first string in the list using the replace method, and add it to a list. Recursively call the function with the rest of the list, and add the result to the list created in the previous step.
Discussions

How to remove unwanted characters from strings in a list
1.- access each element in the list. 2.- replace characters. More on reddit.com
🌐 r/learnpython
5
1
February 1, 2023
python - How to strip/remove certain characters from a list - Stack Overflow
I am currently trying to remove certain characters recursively from a python list. More on stackoverflow.com
🌐 stackoverflow.com
python - Removing a list of characters in string - Stack Overflow
Only characters with z are removed 2. translate(): returns a string where each character is mapped to its corresponding character in the translation table (here from the maketrans fn) 2020-10-18T03:01:56.357Z+00:00 ... Save this answer. ... Show activity on this post. ... str.translate() is from python2 ... More on stackoverflow.com
🌐 stackoverflow.com
Python - removing characters from a list - Stack Overflow
Python's strip() function does exactly that -- remove specific characters from the ends of a string -- but there are probably better ways to do what you want. More on stackoverflow.com
🌐 stackoverflow.com
June 9, 2012
🌐
PythonForBeginners.com
pythonforbeginners.com › home › remove all occurrences of a character in a list or string in python
Remove All Occurrences of a Character in a List or String in Python - PythonForBeginners.com
April 6, 2022 - The original string is: pyctchonfcorbegcinncers The character to delete: c The modified string is: pythonforbeginners · Instead of using the for loop, we can remove the occurrences of a specific value from a given string using the list comprehension and the join() method.
🌐
Reddit
reddit.com › r/learnpython › how to remove unwanted characters from strings in a list
How to remove unwanted characters from strings in a list : r/learnpython
February 1, 2023 - You can use list comprehensions, like so (supposing your list is called lst): lst = [i.strip() for i in lst] Edit: My apologies but this is not the correct solution. u/jimtk 's is right. jimtk • · 4y ago · That solution won't remove the comma! This one will (if there is only one comma!) lst = [x.replace(',', ' ').strip() for x in lst] More replies · Related posts · What does a “normal” professional Python stack look like in 2026?
🌐
ItSolutionstuff
itsolutionstuff.com › post › python-remove-character-from-list-of-strings-exampleexample.html
Python Remove Character from List of Strings Example - ItSolutionstuff.com
October 30, 2023 - we will use replace() to update string in python list. so, let's see the example with output: You can use these examples with python3 (Python 3) version. ... myList = ['Hi&', 'I', 'am', 'Hardik&', 'form', 'India&'] # Python remove character from list of strings newList = [elem.replace('&', '') for elem in myList] print(newList);
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-remove-list-elements-containing-given-string-character
Python | Remove List elements containing given String character - GeeksforGeeks
April 22, 2023 - In this, we iterate for all list elements and check for occurrence of any character using loop. ... # Python3 code to demonstrate working of # Remove List elements containing String character # Using loop # initializing list test_list = ['567', '840', '649', '7342'] # initializing string test_str = '1237' # printing original list print("The original list is : " + str(test_list)) # Remove List elements containing String character # Using loop res = [] for sub in test_list: flag = 0 for ele in sub: if ele in test_str: flag = 1 if not flag: res.append(sub) # printing result print("The list after removal : " + str(res))
Find elsewhere
🌐
Quora
quora.com › How-do-you-remove-a-character-from-an-array-in-Python
How to remove a character from an array in Python - Quora
Answer (1 of 2): Removing a character from a list of strings removes every instance of the character from all the strings in the list. For example, removing [code ]"e"[/code] from [code ]["hello", "there"][/code] results in [code ]["hllo", "thr"][/code]. USE str.replace() AND LIST COMPREHENSION ...
🌐
W3Schools
w3schools.com › python › python_lists_remove.asp
Python - Remove List Items
Python Strings Slicing Strings ... Escape Characters String Methods String Exercises Code Challenge Python Booleans ... Python Operators Arithmetic Operators Assignment Operators Ternary Operator Comparison Operators Logical Operators Identity Operators Membership Operators Bitwise Operators Operator Precedence Code Challenge Python Lists · Python Lists Access List Items Change List Items Add List Items Remove List Items ...
🌐
Python Forum
python-forum.io › thread-13868.html
Remove special character from list
Hi guys, if I would to put ' symbol in the symbols, it is obvious that I won't be getting the desire outcome. I would like to preserve the ' symbol on don't isn't and wouldn't. I've tried with endswith method but still got it wrong. Hope you could h...
🌐
DigitalOcean
digitalocean.com › community › tutorials › python-remove-character-from-string
How to Remove Characters from a String in Python | DigitalOcean
Remove characters from a Python string with replace(), translate(), re.sub(), and slicing. Compare methods, see examples, and pick the right approach.
🌐
TutorialsPoint
tutorialspoint.com › How-to-remove-a-list-of-characters-in-string-in-Python
How to remove specific characters from a string in Python?
May 20, 2025 - Use str.replace() for removing single characters as it's the fastest and most readable. For multiple characters, str.translate() offers the best performance, while list comprehension provides a Pythonic and flexible approach for complex filtering ...
Top answer
1 of 16
285

If you're using python2 and your inputs are strings (not unicodes), the absolutely best method is str.translate:

>>> chars_to_remove = ['.', '!', '?']
>>> subj = 'A.B!C?'
>>> subj.translate(None, ''.join(chars_to_remove))
'ABC'

Otherwise, there are following options to consider:

A. Iterate the subject char by char, omit unwanted characters and join the resulting list:

>>> sc = set(chars_to_remove)
>>> ''.join([c for c in subj if c not in sc])
'ABC'

(Note that the generator version ''.join(c for c ...) will be less efficient).

B. Create a regular expression on the fly and re.sub with an empty string:

>>> import re
>>> rx = '[' + re.escape(''.join(chars_to_remove)) + ']'
>>> re.sub(rx, '', subj)
'ABC'

(re.escape ensures that characters like ^ or ] won't break the regular expression).

C. Use the mapping variant of translate:

>>> chars_to_remove = [u'δ', u'Γ', u'ж']
>>> subj = u'AжBδCΓ'
>>> dd = {ord(c):None for c in chars_to_remove}
>>> subj.translate(dd)
u'ABC'

Full testing code and timings:

#coding=utf8

import re

def remove_chars_iter(subj, chars):
    sc = set(chars)
    return ''.join([c for c in subj if c not in sc])

def remove_chars_re(subj, chars):
    return re.sub('[' + re.escape(''.join(chars)) + ']', '', subj)

def remove_chars_re_unicode(subj, chars):
    return re.sub(u'(?u)[' + re.escape(''.join(chars)) + ']', '', subj)

def remove_chars_translate_bytes(subj, chars):
    return subj.translate(None, ''.join(chars))

def remove_chars_translate_unicode(subj, chars):
    d = {ord(c):None for c in chars}
    return subj.translate(d)

import timeit, sys

def profile(f):
    assert f(subj, chars_to_remove) == test
    t = timeit.timeit(lambda: f(subj, chars_to_remove), number=1000)
    print ('{0:.3f} {1}'.format(t, f.__name__))

print (sys.version)
PYTHON2 = sys.version_info[0] == 2

print ('\n"plain" string:\n')

chars_to_remove = ['.', '!', '?']
subj = 'A.B!C?' * 1000
test = 'ABC' * 1000

profile(remove_chars_iter)
profile(remove_chars_re)

if PYTHON2:
    profile(remove_chars_translate_bytes)
else:
    profile(remove_chars_translate_unicode)

print ('\nunicode string:\n')

if PYTHON2:
    chars_to_remove = [u'δ', u'Γ', u'ж']
    subj = u'AжBδCΓ'
else:
    chars_to_remove = ['δ', 'Γ', 'ж']
    subj = 'AжBδCΓ'

subj = subj * 1000
test = 'ABC' * 1000

profile(remove_chars_iter)

if PYTHON2:
    profile(remove_chars_re_unicode)
else:
    profile(remove_chars_re)

profile(remove_chars_translate_unicode)

Results:

2.7.5 (default, Mar  9 2014, 22:15:05) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]

"plain" string:

0.637 remove_chars_iter
0.649 remove_chars_re
0.010 remove_chars_translate_bytes

unicode string:

0.866 remove_chars_iter
0.680 remove_chars_re_unicode
1.373 remove_chars_translate_unicode

---

3.4.2 (v3.4.2:ab2c023a9432, Oct  5 2014, 20:42:22) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

"plain" string:

0.512 remove_chars_iter
0.574 remove_chars_re
0.765 remove_chars_translate_unicode

unicode string:

0.817 remove_chars_iter
0.686 remove_chars_re
0.876 remove_chars_translate_unicode

(As a side note, the figure for remove_chars_translate_bytes might give us a clue why the industry was reluctant to adopt Unicode for such a long time).

2 of 16
121

You can use str.translate():

s.translate(None, ",!.;")

Example:

>>> s = "asjo,fdjk;djaso,oio!kod.kjods;dkps"
>>> s.translate(None, ",!.;")
'asjofdjkdjasooiokodkjodsdkps'
🌐
W3Schools
w3schools.com › python › ref_list_remove.asp
Python List remove() Method
Python Strings Slicing Strings ... Escape Characters String Methods String Exercises Code Challenge Python Booleans ... Python Operators Arithmetic Operators Assignment Operators Ternary Operator Comparison Operators Logical Operators Identity Operators Membership Operators Bitwise Operators Operator Precedence Code Challenge Python Lists · Python Lists Access List Items Change List Items Add List Items Remove List Items ...
🌐
Built In
builtin.com › software-engineering-perspectives › python-remove-character-from-string
How to Remove Characters From a String in Python | Built In
Python’s translate() method allows for the removal or replacement of certain characters in a string. Characters can be replaced with nothing or new characters as specified in a dictionary or mapping table. For example, let’s use translate() to remove “$” from the the following string:
🌐
Stack Overflow
stackoverflow.com › questions › 43647137 › write-a-function-to-remove-a-character-from-a-list
python - Write a function to remove a character from a list? - Stack Overflow
I need to write my own function that will accept a list, and if the list contains the specified character, said character will be removed. Here's what I have. def deleteElement(self,x): lengt...
🌐
Python Pool
pythonpool.com › home › how to › remove characters from a python string
7 Ways to Remove Character From String Python
July 14, 2026 - The third argument to str.maketrans() lists characters to delete. For more examples, see our focused Python translate guide. str.replace can remove every occurrence or a bounded number of occurrences from a string.
🌐
datagy
datagy.io › home › python posts › python strings › python: remove a character from a string (4 ways)
Python: Remove a Character from a String (4 Ways) • datagy
December 17, 2022 - In this post, you’ll learn how to use Python to remove a character from a string. You’ll learn how to do this with the Python .replace() method as well as the Python .translate() method.