Why is the solution different when I use lst1[ -1: ] vs lst1 [ -1 ] ? The output prints [ 5 ] vs 5 which is what the program is looking for.
Slicing and indexing are not the same thing.
A slice returns a list; a list element accessed via indexing returns the element.
Oh, ok. Thank you for the explanation.