Can someone help me do the Project on books title for Python 3 because I am stuck? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can someone help me do the Project on books title for Python 3 because I am stuck?

It is a project on my python 3course under files handling,

12th Dec 2020, 8:38 PM
James Karino Simel
James Karino Simel - avatar
5 Answers
+ 3
Sure, can you share your attempt first?
12th Dec 2020, 9:22 PM
Steven M
Steven M - avatar
+ 1
#try something like this for line in file: print(line[0]+str(len(line.strip())))
9th May 2021, 1:10 PM
Steven M
Steven M - avatar
0
Ok just a minute
12th Dec 2020, 9:23 PM
James Karino Simel
James Karino Simel - avatar
0
file = open("/usercode/files/books.txt", "r") for line in file: print(file.read(1) + str(len(line))) file.close()
12th Dec 2020, 9:29 PM
James Karino Simel
James Karino Simel - avatar
0
It is not working
13th Dec 2020, 7:46 AM
James Karino Simel
James Karino Simel - avatar