If I have a list of strings such as:
[(\"aaaa8\"),(\"bb8\"),(\"ccc8\"),(\"ffffdffffd8\")...]
What should I do in order to get rid of all the
Beside using loop and for comprehension, you could also use map
lst = [("aaaa8"),("bb8"),("ccc8"),("ffffdffffd8")] mylst = map(lambda each:each.strip("8"), lst) print mylst