![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
躺赢
这个作者很懒,什么都没留下…
展开
-
logger日志的坑
Traceback (most recent call last): File "D:\python-2.7.16.amd64\lib\logging\__init__.py", line 889, in emit stream.write(fs % msg) IOError: [Errno 0] Error Logged from file practice_str.py, line 14 结论:编辑器运行时,logger打印日志中任何字符都可以正常运行 命令行运行时...原创 2020-09-15 19:53:12 · 845 阅读 · 0 评论 -
python中is和==的区别
is :比较的是对象的id ==:比较的是对象的值 对于list,dict,tuple,set 只要重新定义就会产生新的id 对于字符串,数值,都是同一个id #coding=utf-8 # 数值 a=9 b=9 # True print a is b # 字符串 a="hhh" b="hhh" # True print a is b # 字典 a={'a':2} b={'a':2} # False print a is b ...原创 2020-09-15 19:42:48 · 125 阅读 · 0 评论 -
爬虫(一)
import urllib.request import os import random def open_url(url): req = urllib.request.Request(url) req.add_header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64;...原创 2019-11-12 20:12:17 · 491 阅读 · 0 评论 -
Fatal error in launcher: Unable to create process using '"f:\python\environment\python.exe"
使用命令:python -m pip install --upgrade pip原创 2019-11-07 16:17:26 · 1227 阅读 · 0 评论