+ 2
I want to separate the abbreviation of the words in the list and not all join together like this: "GoTUomTiHTJTt", could you giv
a = ["Game of Thrones", "Universe of marvel", "The incredible Hulk", "The Joke", "The titanic"] txt = " " for i in a: lines = i.split() for e in lines: txt = e[0] print(txt, end= "")
2 ответов
+ 12
Oro Collares ,
if this is your desired output: 'GoT Uom TiH TJ Tt', you can fix it by adding an additional print() statement as the last line, making the same indentation as the second for loop:
print(" ", end="")
btw: we do not need: txt = " "
+ 2
Thanks😍😍😍😍😍