How to remove two chars from the beginning of a line

You were off to a good start. Try this in your loop:

for line in lines:
    line = line[2:]
    # do something here

The [2:] is called “slice” syntax, it essentially says “give me the part of this sequence which begins at index 2 and continues to the end (since no end point was specified after the colon).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)