+ 1
please I need help to code Book Titles project in python 3 projects.
2 Respostas
0
Please Post YOUR Code.
Anyways, I have done it in Python like this👇
file = open("/usercode/files/books.txt", "r")
for line in file :
if line[-1] == "\n" :
print(line[0]+str(len(line)-1))
else :
print(line[0]+str(len(line)))
file.close()
Sorry, I posted the link to the solution first😜😜☹
- 1
Please this is the code am a little bit stacked.
file = open("/usercode/files/books.txt", "r")
a=file.readlines()
print(a)
file.close()