In PE class the teacher wants to know who stands at the front and the back. Write ends_of_line(line) to return [first, last]. If only one person is in line, they are both.
ends_of_line(["Mia", "Leo", "Ava"])→['Mia', 'Ava']ends_of_line(["Sam"])→['Sam', 'Sam']def ends_of_line(line):
first = line[0]
# your code here: the last person
last = None
return [first, last]
Run tries the examples. When they look right, Submit.