0
Title Encoder - Intermediate Python
I’m having some trouble with the last Code Project for the Intermediate Python course. The only test case is hidden so I can’t see what error I’m making. How do I change the code to pass the test case? file = open("/usercode/files/books.txt", "r") for x in file: title=x.split() for a in title: print(a[0],end='') print() file.close()
2 Antworten
+ 2
rl = file.readlines()
for r in rl:
sp = r.split()
p = ""
for s in sp:
p += s[0]
print(p)
+ 1
Thank you so much!