How to remove the first character from all the strings in a list of strings with Python

1 Answer

0 votes
lst = ["python", "java", "PHP", "c#", "pascal"] 
 
lst = [s[1: ] for s in lst] 
 
print(lst) 
 
 
 
'''
run:
 
['ython', 'ava', 'HP', '#', 'ascal']
 
'''

 



answered Jan 13, 2020 by avibootz
edited Jan 13, 2020 by avibootz
...