首页 软件开发 代码片段 python ( Page 88 )

python 1073

#Python
终端播放音乐同步显示本地或网络歌词

#!/usr/bin/python # -*- encoding:utf-8 -*- #========================================= # Fi…

2014-11-01 537

#Python
修改mp3的id3 tag内容

#! /usr/bin/env python # encoding: utf8 import sys import os import binascii import json d…

2014-10-31 285

#Python
对比list的处理速度

#网上代码 def open_httptxt(): #打开TXT文本写入数组 st=time.clock() try: passlist = [] list_passlist=[]…

2014-10-31 522

#Python
将华氏温度转换成摄氏温度,或者相反

#-*- charset:utf-8 -*- #This program will follow users intention to convert F to C or the …

2014-10-31 455

#Python
无第三方模块抓取京*东所有iPhone手机价格

chrome按f11找价格部分相关的东西,urllib2单纯爬下来怎么就没价格, 想想可能是jq做的,于是另存所有,开sublime, findall价格相关的各种id,于是乎就找…

2014-10-30 436

#Python
Flask 文件上传

import os from flask import Flask, request, redirect, url_for from werkzeug import secure_…

2014-10-29 420

#Python
python实现堆排序

#沿左,右子节点较大者依次往下调整 def heapify( array, i, n ): j = i * 2 + 1 while j < n: if j + 1 < …

2014-10-29 577

#Python
python爬取返利网商品信息

#coding=utf-8 import sys reload(sys) sys.setdefaultencoding( "utf-8" ) import urllib2 impo…

2014-10-29 341

#Python
python将list连续元素和非连续元素分开转换为指定字符串

obj = {} def test(nums): nums.append(0) for item in nums: start = obj.get('start', item) e…

2014-10-28 973

#Python
Python生成随机密码

# -*- coding:utf8 -*- import random import string import sys reload(sys) sys.setdefaultenc…

2014-10-27 651

#Python
一行代码输出九九乘法表

print (["%d*%d=%d"%(i,j,i*j) for i in range(1,10)for j in range(1,i+1)])

2014-10-27 906