参考资料:
1.http://cs231n.github.io/python-numpy-tutorial/
2.https://docs.python.org/3.5/library/stdtypes.html#sequence-types-list-tuple-range
3.https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000
使用的python版本号:python 3.4.3
Python
首先通过快速排序,感受python语句的简洁性:
关于快速排序可查看我之前的博文:http://blog.csdn.net/u014485485/article/details/78264015
基本数据类型:integers, floats, booleans, and strings
注意:没有x++,x--
逻辑操作符,用英文表示:
字符串操作:
Lists:
Lists are mutable sequences, typically used to store collections of homogeneous items
slicing
loop
用enumerate得到索引:
批量操作数据:
或者简化写为
也可以对数据进行条件筛选:
Dictionaries
储存形如(key,value)的数据
in 用于判断:
Dictionaries的迭代:
Sets
A set object is an unordered collection of distinct hashable objects.