File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
1 File handle/File handle binary Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import pickle
2-
2+ from typing import List , Tuple
33
44def delete_student_record () -> None :
55 """
@@ -21,14 +21,14 @@ def delete_student_record() -> None:
2121 try :
2222 # Read existing student records from file
2323 with open ("studrec.dat" , "rb" ) as file :
24- student_records : list [ tuple [int , ...]] = pickle .load (file )
24+ student_records : List [ Tuple [int , ...]] = pickle .load (file )
2525 print ("Current student records:" , student_records )
2626
2727 # Get roll number to delete
2828 roll_number : int = int (input ("Enter the roll number to delete: " ))
2929
3030 # Filter out the record with the specified roll number
31- updated_records : list [ tuple [int , ...]] = [
31+ updated_records : List [ Tuple [int , ...]] = [
3232 record for record in student_records if record [0 ] != roll_number
3333 ]
3434
You can’t perform that action at this time.
0 commit comments