how to display last 4 elements in list code example Example: how to find last element of list L=[1,2,3,4,5] lastElement=L[L.size()]