Q. 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 MakeUp(Package):
if (Package==[]):
print("Stack empty")
else:
print ("Deleted element :", Package.pop())
y i can't get outut
ReplyDeleteBecause we had make only function.
DeleteThank you so much for clearing my dought
ReplyDeleteWelcome : )
DeleteThank you so much
ReplyDeleteWelcome : )
DeleteBecause we have not call function.
ReplyDeleteplz provide full syntax
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )