Interview Query

Returning Last Element

Start Timer

0:00:00

Upvote
0
Downvote
Save question
Mark as completed
View comments (3)
Next question

Given a list called int_list, write a function called last_element to return the last element of the list.

Example:

Input:

int_list = [0,1,2]

Output:

last_element(int_list) -> 2
.
.
.
.
.


Comments

Loading comments