How to remove the first part of a string till specific index from a list of strings in Python

1 Answer

0 votes
lst = ['+$892', '+$13', '+$8', '+$1298'] 

lst = [s[2:] for s in lst] 

print(lst) 
 
 
 
'''
run:
 
['892', '13', '8', '1298']
 
'''

 



answered Jan 5, 2020 by avibootz
...