help me add while loop question given below.....
hello friends, this is coded by me for kirana store... can anyone tell me where can we insert while loop to continue add more customers at one time. now i can add only 1 customer at a one tome. so please help me thank you reply this way.. continue for c and quite for q(keys for looop) import datetime def gettime(): return datetime.datetime.now() def log(d): if (d==1): name = (input("Enter customer name\n----")) grocerry = str(input("items\n----")) price = (input("enter price\n----")) with open (f"{name}.txt","a",) as name: name.write (str([str(gettime())])+" :- "+grocerry+": \n\t\t\t\t "+str(price)+"\n") print("Noted successfully...") def retrieve(d): if (d==2): name = str(input("Enter customer name\n")) with open (f"{name}.txt") as name: for i in name: print(i,end="") print("CUSTOMER RATION BORROWING MANAGEMENT") print("what do you want?\n 1. Log \n2.Retrieve") d = int(input()) if (d==1): log(d) else: retrieve(d)