Computer Science, asked by pranjaliagarwal0101, 4 months ago

write a function in python pop(list) for performing pop operation in a stack of list containing integers​

Answers

Answered by valeriy69
3

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

l = [1, 2, 3, 4, 5]

def pop(arr):

if len(arr) > 0:

rem_item = arr[-1]

del arr[-1]

return rem_item

print(pop(l))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions