0
Title Encoder Python
пишу любые решения(из инета) и постоянно ошибка. что не так? нужно сделать For example, for the book title "Game of Thrones" the encoded version should be "GoT". file = open("/usercode/files/books.txt", "r") #your code goes here file.close()
4 Antworten
+ 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
t = "Game of Thrones"
for w in t.split(): print (w[0], end="")
0
file = open("/usercode/files/books.txt", "r")
#your code goes here
rl = file.readlines()
for r in rl:
for w in r.split(): print (w[0], end="")
print()
file.close()
https://www.sololearn.com/compiler-playground/c7XcuKuF2B6Y
0
file = open("/usercode/files/books.txt", "r")
#your code goes here
for x in file:
title=x.split()
for a in title:
print(a[0],end='')
print()
file.close()