Return the nth element from a list

nth(lst, n)

Arguments

lst

The list to which the nth element will be returned

n

the index of the element to retrieve

Value

the nth element

Details

Retrieve the nth element of the list via a function call instead of indexing

Author

Jay Morgan

Examples