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.
Δ