
python入门
lovesnowbest
打卡专用博客
展开
-
python 学习笔记
python learning notes 11.list && tuple list is similiar to array in c. But python will check if index is out of range. Also, you can index the last element by using index -1. function: append().原创 2017-08-04 12:06:50 · 286 阅读 · 0 评论 -
python 学习笔记2
python learning notes 2.functionIt’s similiar to c in function. One thing to mention, library function the return value of hex() is a str not a number. So you can do abs() on hex(num). define your own原创 2017-08-04 16:36:44 · 259 阅读 · 0 评论 -
python 学习笔记3
python learning notesSome senior attributes1.Slicecut a piece of elements from the whole container. sytnax:object[beginIndex endIndex (every x)] this provides us an easy way to get fragment of object原创 2017-08-04 21:45:15 · 262 阅读 · 0 评论 -
python 学习笔记4
python learning notes 4functional programming1.high-order functionIn python, we don’t need to worry about elemtype. In other words, if we want a pointer points to a function, it’s won’t bother us to de原创 2017-08-05 18:01:55 · 253 阅读 · 0 评论 -
python 学习笔记5
python learning notes 5ModulePython has many useful modules preparing for us. e.g. sys #!/usr/bin/env python3# -*- coding: utf-8 -*-' plain text '__author__='BetaCZH'import sys # import sys原创 2017-08-05 21:31:08 · 234 阅读 · 0 评论 -
python 学习笔记6
learning python notes 6Objected Oriented Programming(senior)1.__slots__In python, we can dynamically bind method or attribute to an instance. e.g. class Student(object): passdef setName(self,name原创 2017-08-06 14:19:10 · 263 阅读 · 0 评论 -
python图片字符画
how to generate a char picture.1.install pillow. 2.import Image&&import argsparse. argsparse is used for dealing with args,width,height.etc. 3.get_char() functionOur purpose is to get each pixel of原创 2017-08-24 16:30:30 · 455 阅读 · 0 评论