女己。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2019年5月30日

摘要: # import threading #导入线程模块# def func():# print("越努力越幸运")# for i in range(10):# func_thread=threading.Thread(target=func) #为func执行函数创建线程# func_thread.s 阅读全文
posted @ 2019-05-30 20:54 女己。 阅读(954) 评论(0) 推荐(0)

摘要: #冒泡排序;# def bubble_sort(alist):# n=len(alist) #计算序列长度# for i in range(n-1): #遍历无序序列;# for j in range(n-1-i): #构建循环比较相邻的元素条件;# if alist[j]>alist[j+1]: 阅读全文
posted @ 2019-05-30 20:53 女己。 阅读(250) 评论(0) 推荐(0)

摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="vue.js"></script> <style> .a{ width:100px; height:100px 阅读全文
posted @ 2019-05-30 20:51 女己。 阅读(426) 评论(0) 推荐(0)

摘要: # #导入pymysql模块# import pymysql## #建立和数据库的连接# # 参数1:数据库的ip(localhost为本地ip的意思)# # 参数2:数据库端口# # 参数3,4:用户及密码# # 参数5:数据库名# con=pymysql.connect(host='localh 阅读全文
posted @ 2019-05-30 20:47 女己。 阅读(579) 评论(0) 推荐(0)

摘要: #可迭代对象:列表、字典、集合、字符串;能够被for 循环遍历的对象# 数字类型不可迭代;# name="wangyifei"# for i in name:# print(i,end=" ")# print()## list=[11,22,33,44]# for i in list:# print 阅读全文
posted @ 2019-05-30 20:44 女己。 阅读(147) 评论(0) 推荐(0)

摘要: 批量爬取贴吧图片from urllib import requestimport re# %e5%9b%be%e7%89%87url = "http://tieba.baidu.com/f?kw=%E6%91%84%E5%BD%B1%E5%90%A7"headers = { "User-Agent" 阅读全文
posted @ 2019-05-30 20:42 女己。 阅读(242) 评论(0) 推荐(0)

摘要: """正则表达式格式;"""# import re# ret=re.match(正则表达式,要匹配的字符串)# if ret:# print(ret.group())# else:# print("匹配失败")# import re# ret=re.match("abc","abc.cn")# if 阅读全文
posted @ 2019-05-30 20:40 女己。 阅读(213) 评论(0) 推荐(0)