我试图通过.append将字符串的片段添加到列表中,但是当我尝试打印列表时,Python打印“ None”,为什么会发生这种情况?我需要使用索引来“播放”同一字符串的其他片段,该如何实现?
#I need to use the "n" variable to set the lenght of the slice
n = 14
a = "We'll just flyyyyyy awaaaaaay from here, aaaaaaaaaanywhere!!"
f = []
f = f.append(a[0:n])
print(f)