Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

grab the first letter of each string in an array python

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

answer = firstLetterOfEachName()
print(answer)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #grab #letter #string #array #python
ADD COMMENT
Topic
Name
6+3 =