import pickle
text = "Hello world I'm corona virus.I'm coming to the earth."
f = open('text.pck','w')
pickle.dump(text,f)
f.write(text)
f.close()
Traceback (most recent call last):
File "D:\Python\Python\pickle.py", line 1, in <module>
import pickle
File "D:\Python\Python\pickle.py", line 6, in <module>
pickle.dump(text,f)
AttributeError: module 'pickle' has no attribute 'dump'.