擅长:python、mysql、java
<p>进近1#使用for循环</p>
<pre><code>content=["Shotgun","God's Plan","This is me","Solo","Psyco"]
chars=[]
for y in content:
chars.append(y[0])
print(chars)
</code></pre>
<p>方法2#列表理解</p>
<pre><code>content=["Shotgun","God's Plan","This is me","Solo","Psyco"]
chars=[y[0] for y in content ]
print(chars)
</code></pre>