It's been 3 days since I studied Python. There's a lot I don't know. I want to make a sawtooth 2D list into Json, so how should I do it?
[
['900', '196', '196', '192', '57'],
["After 1 Minute", "After 12 Minutes", "After 15 Minutes", "After 16 Minutes", "13:40",
["Ganada", "Lulu", "Cider", "Coke"]
]
Not through any structuralization
If you want to make the data structure purely json format...
import json
list = ['900', '196', '196', '192', '57'], ['1 minute later', '12 minutes later', '15 minutes later', '16 minutes later', '13:40'], ['Ganada', 'Lulu', 'Cider', 'Cola']]
# # encode
json_str = json.dumps(list)
# # decode
# # json.loads(json_str)
Within the given list...
To give you a serious answer, it's not clear under what conditions and by what rules the material should be made into json, so No json can make it.
584 PHP ssh2_scp_send fails to send files as intended
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
920 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
623 Uncaught (inpromise) Error on Electron: An object could not be cloned
576 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.