file and load the data from that file the next time the program runs you can also use json to share data between different python programs even betterthe json data format is not specific to pythonso you can share data you store in the json format with people who work in many other programming languages it' useful and portable formatand it' easy to learn note the json (javascript object notationformat was originally developed for javascript howeverit has since become common format used by many languagesincluding python using json dump(and json load(let' write short program that stores set of numbers and another program that reads these numbers back into memory the first program will use json dump(to store the set of numbersand the second program will use json load(the json dump(function takes two argumentsa piece of data to store and file object it can use to store the data here' how you can use json dump(to store list of numbersnumber_ writer py import json numbers [ filename 'numbers jsonv with open(filename' 'as f_objw json dump(numbersf_objwe first import the json module and then create list of numbers to work with at we choose filename in which to store the list of numbers it' customary to use the file extension json to indicate that the data in the file is stored in the json format then we open the file in write modewhich allows json to write the data to the file at we use the json dump(function to store the list numbers in the file numbers json this program has no outputbut let' open the file numbers json and look at it the data is stored in format that looks just like python[ now we'll write program that uses json load(to read the list back into memorynumber_ reader py import json filename 'numbers jsonv with open(filenameas f_objw numbers json load(f_objprint(numbersfiles and exceptions