摘要:
import json with open('jsonfile.json') as js:js = json.load(open('jsonfile.json')) ss = json.load(js)print(js) print(ss) 阅读全文
摘要:
filename = 'mesg.csv' import csvwith open(filename)as fn: fn = csv.reader(open(filename,'r')) name = fn.read() for i in fn: print(name) print(i) 阅读全文
摘要:
from urllib import requesturl="http:........." #url地址Request = request.urlopen(url)Response=Request.read()with open('1.jpg','wb')as f: #保存在目录中 f.write 阅读全文
摘要:
Python:https://www.python.org/downloads Pychram:http://www.jetbrains.com/pycharm/download/ pip:https://pypi.python.org/pypi/pip 阅读全文
摘要:
str(字符串)、int(数值)→ 变量 → 列表[ a,b ] → 字典{a:b} → 函数def a(); → 类class a(); 查看python文件路径: import sys import pprint pprint.pprint(sys.path) windows设置Python环境 阅读全文
摘要:
灰底:【File】→【Setting(Ctrl+Alt+S)】→【Appearance & Behavior】→【Appearance】→【Theme:】 行号:【File】→【Setting(Ctrl+Alt+S)】→【Editor】→【General】→【Appearance】→【Show li 阅读全文
摘要:
下载:wget ......................... 解压:tar -xzvf .................... 生成: 进入目录:cd .... 安装:./configure→make→make install 指向: 检查:echo $PATH (确认没有新Python版本 阅读全文