Please help cause i dont understand how this is
Well i have this test from python 3: _Book Titles: _You have been asked to make a special book categorization program, which assigns each _book a special code based on its title. _The code is equal to the first letter of the book, followed by the number of characters in _the title. _For example, for the book "Harry Potter", the code would be: H12, as it contains 12 _characters (including the space). _You are provided a books.txt file, which includes the book titles, each one written on a _separate line. _Read the title one by one and output the code for each book on a separate line. _For example, if the books.txt file contains: _Some book _Another book _Your program should output: _S9 _A12 _Recall the readlines() method, which returns a list containing the lines of the file. Also, remember that all lines, except the last one, contain a \n at the end, which should not be included in the character count. And this is my code: file = open("/usercode/files/books.txt", "r") line=file.readlines() for line in line: print(line[0]+str(len(line))) file.close() ok,so the output should be: _H12 _T16 _P19 _G18 And mine is: H13 T17 P20 G18 If anyone can help me with this i would be very thankfull,because im new with python and i think i were doing it well but i cant with this.