Challenge yourself

Beginner
Intermediate
Expert

Define a function that takes one list and a value, t and v, and changes its second to last (the one before the last) element to v.