You are on page 1of 1

record[int(upd_index)][0] = new_name

record[int(upd_index)][1] = new_reg # Overwriting existing value

record[int(upd_index)][2] = new_age

record[int(upd_index)][3] = new_major

record[int(upd_index)][4] = new_email

record[int(upd_index)][5] = new_address

print("----------------------")

print("Student Data updated successfully")

print("----------------------")

def delete_student(): # Function to delete student data

del_index = input("Enter index(From 0) to Delete student record:")

del record[int(del_index)] # del method to remove element

print("----------------------")

print("Student Data Deleted successfully")

print("----------------------")

while True: # Displaying the option menu infinitely

print("PRESS 1 : TO ADD STUDENT INFORMATION")

if len(record) >= 1:

print("PRESS 2 : TO DELETE STUDENT INFORMATION")

if len(record) >= 1: # Validating the option whether student data exists or not

print("PRESS 3 : TO UPDATE STUDENT INFORMATION")

if len(record) >= 1:

print("PRESS 4 : TO DISPLAY STUDENTS INFORMATION")

You might also like