I have a list of strings in Python, in which some of the strings start with character -, and I want to remove such character.
I tried this sentence:
columns = [column[1:] for column in columns if column.startswith('-') else column]
but I get a Sintax Error exception.
What is the right way to do this?
 
     
    