Program for write data in binary file in python
import pickle
f=open("ram.dat","wb")
a=[]
roll=int(input("Enter the Student Roll Number"))
name=input("Enter the Student name")
marks=int(input("Enter the Student marks"))
b=[roll,name,marks]
a.append(b)
pickle.dump(a,f)
f.close()
No comments:
Post a Comment
for more information please share like comment and subscribe