黑马程序员技术交流社区

标题: 【上海校区】刷leetcode [打印本页]

作者: 不二晨    时间: 2019-3-15 16:35
标题: 【上海校区】刷leetcode
1、类和实例
类是抽象的模板
例是根据类创建出来的一个个具体的“对象”
例:

class Student(object):
bart = Student()
bart
<main.Student object at 0x10a67a590> # 0x10a67a590是个内存地址
Student
<class ‘main.Student’>
bart是个变量
student()是个实例
student是个类

2、type & rtype
type: Type of a parameter.
vartype: Type of a variable.
rtype: Return type. (函数返回的数据的类型)
---------------------
【转载,仅作分享,侵删】
作者:琪仔要转行回coder
来源:CSDN
原文:https://blog.csdn.net/lllllaaa77/article/details/86081741
版权声明:本文为博主原创文章,转载请附上博文链接!


作者: 不二晨    时间: 2019-3-20 16:55
奈斯,感谢分享




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2