Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python pickle save and load multiple variables

import pickle

a = 3; b = [11,223,435];
pickle.dump([a,b], open("trial.p", "wb"))

c,d = pickle.load(open("trial.p","rb"))

print(c,d) ## To verify
Comment

PREVIOUS NEXT
Code Example
Python :: python -m http 
Python :: import matplotlib python 
Python :: f string python not working in linux 
Python :: put array over array in numpy 
Python :: classe statistique dataframe python 
Python :: bnbpay 
Python :: how to print text after an interger 
Python :: python spearman correlation 
Python :: os.remove directory 
Python :: print underline text python 
Python :: pandas add a column with loc 
Python :: how to know if a input is a interger in python 
Python :: check if env variable exists python 
Python :: tkinter maximize window 
Python :: python filter list of int and strings 
Python :: drop null rows pandas 
Python :: df order by 
Python :: open dicom images python 
Python :: random choice dictionary python 
Python :: bulk file name changer in python 
Python :: how to find current age from date of birth in python 
Python :: get difference of images python 
Python :: save matplotlib figure 
Python :: how to sharpen image in python using cv2 
Python :: Change the year in 2nd line to get the answer for the year you want. Ex: year=2010 
Python :: pandas extract month year from date 
Python :: python how to remove last letter from string 
Python :: write muli line conditional statements in python 
Python :: print list vertically in python with loop 
Python :: view point cloud open3d 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =