names = ["Alice", "Bob", "Charlie", "David"]
### adjust code here ###
first_characters = [name[0] for x in names]
print(first_characters) # expected ['A', 'B', 'C', 'D']
Python
Setting up Python environment...
Output
names = ["Alice", "Bob", "Charlie", "David"]
### adjust code here ###
first_characters = [name[0] for x in names]
print(first_characters) # expected ['A', 'B', 'C', 'D']
Setting up Python environment...