上一页 1 ··· 34 35 36 37 38
摘要: 1 from bs4 import BeautifulSoup 2 import requests,urllib.request,urllib.parse 3 import json 4 import time 5 import os 6 headers = {'User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac ... 阅读全文
posted @ 2017-02-10 11:22 Erick-LONG 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 1 from time import ctime,sleep 2 import threading 3 def music(): 4 for i in range(2): 5 print ("I was listening to music. %s" %ctime()) 6 sleep(4) 7 8 def move(): 9 ... 阅读全文
posted @ 2017-02-10 11:19 Erick-LONG 阅读(192) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2017-02-10 11:16 Erick-LONG 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 import random 4 temp ='' 5 for i in range(6): 6 num = random.randrange(0,4) 7 if num ==3 or num == 1: 8 rad2 = random.randra... 阅读全文
posted @ 2017-02-10 08:00 Erick-LONG 阅读(221) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- import smtplib from email.utils import formataddr from email.mime.text import MIMEText def email(p,text,subject): msg = MIMEText(text,'plain','utf-8')... 阅读全文
posted @ 2017-02-09 07:23 Erick-LONG 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 一、set提供的方法 add 添加一个元素 clear 清空 difference A存在,B不存在,返回一个新值 difference__update A存在,B不存在,A更新 remove(报错) discard(不存在的不报错) 移除元素 intersection 取交集 intersecti 阅读全文
posted @ 2017-02-08 08:53 Erick-LONG 阅读(151) 评论(0) 推荐(0) 编辑
摘要: all_asset = 0 i1 = input("请输入总资产:") all_asset = int(i1) goods = [ {'name':'电脑','price':1999}, {'name':'鼠标','price':10}, {'name':'油田','price':20}, {'name':'美女','price':998} ] for i i... 阅读全文
posted @ 2017-02-08 08:08 Erick-LONG 阅读(981) 评论(0) 推荐(0) 编辑
摘要: 一、过7 1 start =1 2 while start<=10: 3 if start !=7: 4 print(start) 5 start +=1 二、100以内的和 1 sum = 0 2 start = 1 3 while start<=100: 4 sum = sum +start 5 阅读全文
posted @ 2017-02-06 22:21 Erick-LONG 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1、ls命令 ls是list的缩写,常用命令为ls(显示出当前目录列表),ls -l(详细显示当前目录列表),ls -lh(人性化的详细显示当前目录列表),ls -a(显示出当前目录列表,包含隐藏文件) 2、cd 命令 cd是change direcory的缩写,常用命令为 cd 目录,cd ..为 阅读全文
posted @ 2017-02-05 22:34 Erick-LONG 阅读(3441) 评论(1) 推荐(1) 编辑
摘要: 一、linux系统命令 pwd 当前目录位置 / 根目录 cd (change direcory) cd ..返回上一层目录 ls 显示当前目录下文件 ls -l 显示目录下详细文件信息 ls -lh 人性化的显示详细信息 ls -a 显示目录下隐藏文件 ls -lha 人性化显示隐藏文件的详细信息 阅读全文
posted @ 2017-02-05 15:40 Erick-LONG 阅读(264) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38