ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
1、生成MyClass类 ``` class MyClass: a = 5 b = 2 c = "hello" ``` 2、生成MyClass类,然后调用该类 ``` class MyClass: a = 5 b = 2 c = "hello" new_item = MyClass() ``` 3、生成MyClass类,然后调用该类,修改属性的值 ``` class MyClass: a = 5 b = 2 c = "hello" new_item = MyClass() print new_item.a print new_item.c new_item.a = 10 print new_item.a ```