📌  相关文章
📜  获取数组中每个字符串的第一个字母 python 代码示例

📅  最后修改于: 2022-03-11 14:47:23.708000             🧑  作者: Mango

代码示例2
def firstLetterOfEachName():
    names = ["Kevin", "Cameron", "Liam", "Meghan"]
    firstLetter = [x[0] for x in names]
    return firstLetter

answer = firstLetterOfEachName()
print(answer)