1、list.append(obj) 向列表中添加一个对象obj
list = ['apple', 'pear', 'orange']
>>> list.append('apple')
>>> list
['apple', 'pear', 'orange', 'apple']
2、list.count(obj) 返回一个...
分类:
编程语言 时间:
2014-05-12 14:17:41
阅读次数:
418
1. 序列:seq[n], seq[x:y], seq * n序列重复n次,切片, 序列翻转
s=”abcde", s[::-1]="edcba" 内建函数:1. 类型转换: list(iter), str(obj), unicode(obj),
tuple(iter) , 2. len(seq)....
分类:
编程语言 时间:
2014-05-12 13:57:06
阅读次数:
424
1. 标准类型 Integer,Boolean, Long integer, Floating
point real number, Complex number, String, List, Tuple, Dictionary 其他内建类型: 类型,
Null对象(None) 文件,集合,函数.....
分类:
其他好文 时间:
2014-05-10 00:20:30
阅读次数:
336
同样的缩进表示这段代码处于同一个层次。每一个print都自带一个换行。定义变量一定要在使用函数等之前。abs(-14) ======= 取绝对值函数 内建函数
print abs(-14) ====== 14notepad++编译器没有gbk的 所以但是dos脚本系统是使用gbk的 所以建议直接使用...
分类:
编程语言 时间:
2014-05-04 11:38:35
阅读次数:
438