Python 学习笔记
文章平均质量分 50
jiqikewang
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python编辑器IDLE的快捷键(随时补充)
1:Tab键,可以补全输入的后面的内容原创 2011-09-14 15:00:43 · 1074 阅读 · 0 评论 -
python中函数的几个小知识点
''' Created on 2011-9-29 @author: xgzhao ''' # variant parameters in function definition def fun(name, age=12, *rest): print name, age原创 2011-09-29 16:49:12 · 556 阅读 · 0 评论 -
try except
''' Created on 2011-9-29 @author: xgzhao ''' #try-except try: f = open('unicode.txt', 'r') except IOError, e: print 'Could not open原创 2011-09-29 14:38:56 · 394 阅读 · 0 评论 -
python字符串专题 以及Unicode应用小例子
''' Created on 2011-9-29 @author: xgzhao ''' # The repetition of sequence seq*expr seq = ['a', 'b', 'c', 'd'] print seq*2 #cut the last a原创 2011-09-29 11:25:38 · 792 阅读 · 0 评论 -
python中数字的几个小知识点
''' Created on 2011-9-28 @author: xgzhao ''' # chapter5 numbers anInt = 123 del anInt # complex aComplex = -1.23-3.45j print aComplex.rea原创 2011-09-28 14:36:26 · 618 阅读 · 0 评论 -
list and dict
''' Created on 2011-9-29 @author: xgzhao ''' list2 = list('foo') print list2 list2.remove('f') print list2 print [i*2 for i in range(8) if原创 2011-09-29 14:26:11 · 448 阅读 · 0 评论 -
条件循环一些小知识点
''' Created on 2011-9-28 @author: xgzhao ''' s = 'abcdefg' print s[::-1] #reverse print s[::2] # just like a?x:y in Java, in Python is原创 2011-09-29 09:22:41 · 577 阅读 · 0 评论 -
专题一:文件读写
python学习笔记:2011/9/23《pyton基础教程》和《python核心教程》交叉阅读。 专题一:文件和输入输出 1:打印语句可以用 % 来替换语句。例如 print "%s is number of %d" % ("Python", 1)原创 2011-09-23 16:12:24 · 790 阅读 · 0 评论 -
专题二、python快速入门
user = raw_input("Enter login name: ")print "your login name is", user #1、下面是一种和Java类似的注释,就是在类或者函数的开头,写一个字符串def foo(): "This is a doc str原创 2011-09-26 15:34:01 · 686 阅读 · 0 评论 -
TypeError: this constructor takes no arguments(Python 学习遇到的错误1)
第一个错误Traceback (most recent call last): File "", line 1, in f = FooBar('wrong') TypeError: this constructor takes no arguments 源码如下:原创 2011-09-15 14:39:46 · 7979 阅读 · 2 评论 -
python中最后一个基础知识点,面向对象
''' Created on 2011-9-30 @author: xgzhao ''' class MyData(): pass #The instance attributes need not bo be defined in the class, just u原创 2011-09-30 14:15:04 · 441 阅读 · 0 评论
分享