4. Write AddCustomer(Customer) and Delete Customer() methods in Python to add
new Customer and delete a Customer from a List of CStack, considering them
act as push and pop operations of the stack data structure. Details of Custom
stored in list are: CID, NAME.
3
OR
Write a program to write following data in csv file STUDENT.csv:
[[1109,"SUNIL', 'XII', '2009'1, [1110,"ANIL','XII', '2009']).
Header of the data is ADMNO, NAME, CLASS, YEAR
1
Answers
Answered by
2
Answer:
Data sharing is the practice of making data used for scholarly research available to other investigators.
Answered by
4
Program :
def AddCustomer(Customer):
S.append(Customer)
print("Element : ",Customer," , inserted successfully")
def DeleteCustomer():
if S == []:
print("Stack is Empty")
else:
print("Deleted element is : ",S.pop())
S=[]
i = int(input("0 - exit / 1 - Add Customer / 2 - Delete Customer : "))
while (i!=0):
if i==1:
C = [input("Enter Customer ID : ") , input("Enter Customer Name : ")]
AddCustomer(C)
elif i==2:
DeleteCustomer()
else:
print("Invalid Choice")
i = int(input("0 - exit / 1 - Push / 2 - Pop : "))
Similar questions