feellikelearning.idea@gmail.com
Feel Like Learning
程序|生活|学到就是赚到
feellikelearning June 7, 2023 0 Comments
Python, 编程
如果需要保存Python运行中的某个dict对象,或者从硬盘里的JSON读进内存,可以用下面命令
import json # Serialize data into file: json.dump( data, open( "file_name.json", 'w' ) ) # Read data from file: data = json.load( open( "file_name.json" ) )
← Previous post
Next post →
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.
Δ