I have a number of strings that I would like to remove the last character of each string. When I try out the code below it removes my second line of string instead of removing the last element. Below is my code:
Code
with open('test.txt') as file:
seqs=file.read().splitlines()
seqs=seqs[:-1]
test.txt
ABCABC
XYZXYZ
Output
ABCABC
Desired output
ABCAB
XYZXY