Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Python

Giữ Python Tuple khi serialize JSON

Giống bài 1003106786: JSON không có tuple, json module convert tuple→list. Giữ immutable: pickle (.pkl) hoặc custom encoder/decoder.