Created
April 25, 2020 11:15
-
-
Save computer-tutor/1ad62682d898981658a92c529c9f03e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def push(stack, pin_code, city_name): | |
stack.append({'pin':pin_code, 'city':city_name}) | |
pass | |
def pop(stack): | |
return stack.pop() | |
l=[] | |
push(l,842001, 'Muz') | |
push(l,110078, 'Delhi') | |
push(l, 820067,'Patna') | |
print(l) | |
print("Popped element is", pop(l)) | |
print("Popped element is", pop(l)) | |
print("Final List =",(l)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment