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 RĂ©ponses
+ 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!