To push an item on the stack
myArray=[]
item =int(input(" enter item to push"))
stackfull =10 ' the array does not exceed 10'
basepointer= 0' starting at index 0
toppointer =1 ' initializing toppointer '
If toppointer< stackfull :' checking if array not full
toppointer=toppointer+1' increment toppointer
myArray[toppointer]= item
print ("stack full")
print(my list)