摘要: 切片对象:例子:In [13]: l = [1,23,4,5,5,6,8]In [14]: l[::1]Out[14]: [1, 23, 4, 5, 5, 6, 8] In [15]: l[::2]Out[15]: [1, 4, 5, 8] In [16]: l[::3]Out[16]: [1, 5 阅读全文
posted @ 2017-11-15 20:14 菜鸟的日记 阅读(325) 评论(0) 推荐(0) 编辑
摘要: urllib2的简单介绍参考网址:http://www.voidspace.org.uk/python/articles/urllib2.shtml Fetching URLsThe simplest way to use urllib2 is as follows :1、import urllib 阅读全文
posted @ 2017-11-15 20:09 菜鸟的日记 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 程序会遍历文件所有姓名,遍历完之前不会有重复值,遍历所有后将提示推出。#-*-coding:utf-8-*-#author:wangxing#点名程序import randomimport os,sys#点名程序import randomimport os,sys#定义一个已经被点名的集合calle 阅读全文
posted @ 2017-11-15 09:27 菜鸟的日记 阅读(8487) 评论(0) 推荐(0) 编辑