Test Index
CBSE Class 12 Computer Science 2024 Paper Compartment
© examsnet.com
Question : 30 of 35
Marks:
+1,
-0
A dictionary,
d_city contains the records in the following format :{state:city}Define the following functions with the given specifications :(i) push_city(d_city): It takes the dictionary as an argument and pushes all the cities in the stack CITY whose states are of more than 4 characters.(ii) pop_city(): This function pops the cities and displays "Stack empty" when there are no more cities in the stack.
Go to Question: