摘要: 一.List 1 #coding=utf-8 2 xx = [8, 2, 4, 5, 6] 3 xx.append(7) 4 print xx 5 print xx[:3] 6 print xx[3:] 7 print xx.index(4) 8 xx.insert(3, 3) 9 print xx 阅读全文
posted @ 2016-03-05 19:29 早杰 阅读(1754) 评论(0) 推荐(0) 编辑
摘要: 1 #coding=utf-8 2 #print函数 3 print 3, -1, 3.14159, -2.8 4 #type函数 5 print type(3), type(3.14159), type("123") 6 #类型转换 7 print int(3.14159), int(-2.8) 阅读全文
posted @ 2016-03-05 11:37 早杰 阅读(7078) 评论(0) 推荐(1) 编辑