Python book title program
So Umm basically I am stuck on a program. Basically I am near at the end but Still couldn't finish it. It tells us to make a program with diferrent book title and make a code and write it to a file and output it in seperate like. I managed to get the title code but how can I take different input ??? Description and my code are below . 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 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} s= "History book" y=str(len(s)) file = open("booktitle.txt", "w") file.write(s[0]+y) file.close() file = open("booktitle.txt", "r") x = file.read() file.close() print(x)