You can add a to_json() method to convert the attributes to class. Here is the code import json class MyClass: def __init__(self): self.name = 'Python' ...
確定! 回上一頁