![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Nishikiyama
这个作者很懒,什么都没留下…
展开
-
Python Class 笔记
Python Class 笔记 文章目录创建`__init__`特点subclassinheritance 创建 class Student: school = 'MIT' # 每个方法的第一个参数必须是 self def calculateFinalGrade(self): # 注意有两种调用方法! 下面有例子 ... return theFinalGrade mar...原创 2019-11-06 08:35:38 · 156 阅读 · 0 评论 -
Python Tuple 笔记
Tuple 类似一个 immutable list 创建方法 >>> t = 'a', 'b', 'c', 'd', 'e' >>> t2 = ('a', 'b', 'c', 'd', 'e') # 不建议使用吧 >>> t3 = tuple() >>> t = tuple('lupins') >>&...原创 2019-11-05 09:45:53 · 169 阅读 · 0 评论 -
Python Dictionary 笔记
Python Dictionary 笔记 等同于 JAVA 的 map 无序 创建 >>> eng2sp = dict() >>> eng2sp = {'one': 'uno', 'two': 'dos', 'three': 'tres'} >>> print eng2sp {} 添加 key value >>> eng2...原创 2019-11-04 23:06:00 · 138 阅读 · 0 评论 -
Python List 笔记
Python List 笔记 in 表达式 >>> cheeses = ['Cheddar', 'Edam', 'Gouda'] >>> 'Edam' in cheeses True + * operator >>> a = [1, 2, 3] >>> b = [4, 5, 6] >>> c = a + ...原创 2019-11-04 07:51:49 · 119 阅读 · 0 评论 -
Python 笔记
Python 笔记 basics >>> 4 4 >>> print 4 4 >>> type (4) <type 'int'> >>> type ('hehe') <type 'str'> >>> print 1,000,000 1 0 0 types of variab...原创 2019-11-04 05:26:32 · 155 阅读 · 0 评论