+ 1

Python file system Code Coach roadblock

I am stuck on the “Book Titles” Code Coach problem. I have done a lot of debugging but I am stumped. Here’s my code I am using: file = open("/usercode/files/books.txt", "r") list = file.readlines() code = "" y = 0 for name in list: list[y] = name.replace("\\n", "") for char in list[y]: x = 1 if x == 1: code = char x += 1 code = code + str(x) y += 1 print(code) code ="" file.close()

16th Dec 2020, 4:52 PM
Aidan “HTMLPuppy” Dalzell
Aidan “HTMLPuppy” Dalzell  - avatar
3 Antworten
16th Dec 2020, 5:10 PM
JaScript
JaScript - avatar
+ 1
JaScript thanks
16th Dec 2020, 8:02 PM
Aidan “HTMLPuppy” Dalzell
Aidan “HTMLPuppy” Dalzell  - avatar
0
Your welcome
17th Dec 2020, 8:09 AM
JaScript
JaScript - avatar