Write a method DeleteRecord() that accepts a roll number as an argument and deletes the records of the student from a pickled file 'student.dat'
Answers
Answered by
0
Answer:
Computer Science with Python–XII A.4 35. Write a user-defined function CountLines() that counts the number of lines in a text file ‘Project.txt’
Section II
Explanation:
Answered by
0
def Delete Record( a):
for i in student.dat:
if i. roll_ no == a:
student.dat. remove(i)
Explanation:
A method is used to denote a function inside of a lass.
The required method is:
def Delete Record( a):
for i in student.dat:
if i. roll_ no == a:
student.dat. remove(i)
Similar questions
Business Studies,
2 months ago
Math,
2 months ago
Math,
10 months ago
Computer Science,
10 months ago
English,
10 months ago