Extract the last element of an List
Given a List, return the last element.
Sample Code:
def lastEle(arr):
# Enter your logic here...
Examples:
Input: [1,2,3]
Output: 3
Explanation: The element 3 has the highest index.
Input: [1]
Output: 1
Explanation: The element 1 has the highest index.