I have a nested list and in every list the first item is a string that ends with .abc
. I would like to remove all the .abc
characters from my nested list.
Here's what I have got:
x = [['car.abc', 1, 2], ['ship.abc', 3, 4]]
And I would like to my nested list to be the following:
x = [['car', 1, 2], ['ship', 3, 4]]
How can I achieve this?