摘要: try: import urllib.request as urllib2 except ImportError: import urllib2 response = urllib2.urlopen("http://www.baidu.com") print(response.getcode()) response = urllib2.urlopen('http://www.... 阅读全文
posted @ 2017-04-12 22:42 layfork 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1.list list是一种有序的集合 例子:classmates = ['Michael', 'Bob', 'Tracy']; 方法:1. len len(classmates) //3 2.append classmates.append('Adam') //['Michael', 'Bob', 阅读全文
posted @ 2017-04-12 08:11 layfork 阅读(151) 评论(0) 推荐(0) 编辑