CBSE Class 12 Computer Science
Question 44 of 63
Data Structures in Python — Question 18
Back to all questionsAn algorithm to insert element into Stack as a list is as follows:
- START
- Stack = list() or Stack = [] #Initialize a Stack using list
- element = input("Enter the value to be added in the stack: ")
- Stack.append(element) #Adding element into list
- END