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
Math,
10 days ago
Physics,
10 days ago
Business Studies,
20 days ago
Math,
20 days ago
Math,
8 months ago
Computer Science,
8 months ago
English,
8 months ago