Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove characters in array of string python

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #characters #array #string #python
ADD COMMENT
Topic
Name
7+1 =