I want to slice every string in a list in Python.
This is my current list:
[\'One\', \'Two\', \'Three\', \'Four\', \'Five\']
This i
You can do:
>>> l = ['One', 'Two', 'Three', 'Four', 'Five'] >>> [i[:-2] for i in l] ['O', 'T', 'Thr', 'Fo', 'Fi']