in this tutorial we'll learn how to get the last item of array

syntax

1
2
#syntax
array[-1]

example

1
2
3
4
5
6
7
8
#array
array = ['Dog', 'Cat', 'Zebra', 'Tiger']

#get the last element
last_element = array[-1]

#print
print(last_element)

output

Tiger

English today is not an art to be mastered it's just a tool to use to get a result