1 >>> import pickle 2 >>> m_list=['1',2,'asa'] 3 >>> m_list 4 ['1', 2, 'asa'] 5 >>> m_file=open('my_file.pkl','wb') 6 >>> pickle.dump(m_list,m_file) 7 >>> pickle.close() 8 9 Traceback (most recent call last):10 File " ", line 1, in 11 pickle.close()12 AttributeError: 'module' object has no attribute 'close'13 >>> my_file.close()14 15 Traceback (most recent call last):16 File " ", line 1, in 17 my_file.close()18 NameError: name 'my_file' is not defined19 >>> m_file.close()20 >>> m_file=open('my_file.pkl','rb')21 >>> m_list2=pickle.load(m_file)22 >>> print (m_list2)23 ['1', 2, 'asa']24 >>>