0

is it effective decision

I am solving this exercise: 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 My decision: file = open("/usercode/files/books.txt") line=file.readlines() line[3]=line[3]+"\n" for i in line: print(i[0]+str(len(i)-1)) is it effective? actually why there is no option to see the decision in the task?

22nd Mar 2022, 11:24 AM
Askar Kondybaev
Askar Kondybaev - avatar
1 Respuesta
+ 2
Yes and you can see a solution in lesson projects. But, it's not available for module projects
22nd Mar 2022, 11:43 AM
Simba
Simba - avatar