Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
39 code project (Python)
Hi, Iāve already written the code and it works but the test says me itās wrong. Can someone help me??
7 Respostas
+ 2
Your code?
+ 2
file = open("/usercode/files/books.txt", "r")
for line in file.readlines():
g=line.split(" ")
e=""
for o in g:
e+=o[0]
print(e)
file.close()
+ 2
Your code is missing two inputs.
https://code.sololearn.com/cZrx4H2mo27S/?ref=app
+ 1
https://code.sololearn.com/cNEHV3jR2m5F/?ref=app
+ 1
file = open("/usercode/files/books.txt", "r")
for line in file:
words = line.split()
i = ""
for word in words:
i += word[0]
print(i)
file.close()
0
Itās working, thank you so much.
But, why my code doesnāt work?
0
Perfect, thank you so much.