I am trying to set a variable equal to the last 6 characters in a line of an input file. Using the below code I am trying to do this but I don't know the syntax to do so, and I get a syntax error. Thanks.
for line in f:
x = line[......$]
Here is the specific error:
File "bettercollapse.py", line 15
x = line[......$]
^
SyntaxError: invalid syntax