import mysql.connector import datetime mydb=mysql.connector.connect(host="localhost",\ user="root",\ passwd="root",\ database="practicalexam") mycursor=mydb.cursor() def teacheradd(): L=[] tno=int(input("Enter tno:")) L.append(tno) tname=input("Enter tname:") L.append(tname) tsalary=int(input("Enter tsalary:")) L.append(tsalary) value=L value=(tno,tname,tsalary) sql="insert into teacher(tno,tname,tsalary)values(%s,%s,%s)" mycursor.execute(sql,value) mydb.commit() def teachersearch(): ...
a=[] c= "y" while(c=="y"): print("1. INSERT") print("2. DELETE") print("1. DISPLAY") choice=int(input("Enter Your Choice:")) if(choice==1): b=input("Enter new number:") a.append(b) elif(choice==2): if(a==[]): print("Queue is Empty") else: print("Deleted value is:",a[0]) a.pop(0) elif(choice==3): length=len(a) for i in range(0,length): ...