In Python we use lists rather arrays. Although, for our purpose they are one in the same. A node (element) in a linked list contains two fields:
We could introduce a ‘previous’ field into the node but we shall just focus on the fore-mentioned fields.
Also, we must keep track of the size of the list and a pointer that holds the position of the beginning of the list.
We shall build