Saved Bookmarks
| 1. |
Write a function in python, MakePush(Package) and MakePop(Package) to add a new Package and delete a Package from a List of Package Description, considering them to act as push and pop operations of the Stack data structure. |
|
Answer» def MakePush(Package): a=int(input("enter package title : ")) Package.append(a) def MakePop(Package): if (Package==[]): print( "Stack empty") else: print ("Deleted element:",Package.pop()) |
|