#!/usr/bin/python # -*- coding: UTF-8 -*- import json numbers = [2,3,4,7,11,13] filename = 'numbers.json' with open(filename,'w') as f: json.dump(numbers,f) with open(filename,'r') as ss: a = json.load(ss) print(a)
#!/usr/bin/python # -*- coding: UTF-8 -*- import json numbers = [2,3,4,7,11,13] filename = 'numbers.json' with open(filename,'w') as f: json.dump(numbers,f) with open(filename,'r') as ss: a = json.load(ss) print(a)