码迷,mamicode.com
首页 >  
搜索关键字:decode    ( 2985个结果
decode-authorization-message
Decodes additional information about the authorization status of a request from an encoded message returned in response to an AWS request. For example ...
分类:其他好文   时间:2019-10-03 22:08:52    阅读次数:93
内置函数
eval:执行字符串类型的代码,并返回最终结果。 exec:执行字符串类型的代码。 hash:获取一个对象(可哈希对象:int,str,Bool,tuple)的哈希值。 " " ;) " " ;) help:函数用于查看函数或模块用途的详细说明。 callable:函数用于检查一个对象是否是可调用的 ...
分类:其他好文   时间:2019-10-03 20:20:57    阅读次数:96
python-----内置函数
python 内置函数 内置函数操作 1 !usr/bin/env python 2 coding:utf 8 3 1.locals()和globals() 4 def func(): 5 x=1 6 y=2 7 print(locals()) 8 print(globals()) 9 func() ...
分类:编程语言   时间:2019-10-03 10:46:54    阅读次数:82
字符编码补充
字符编码总结 1.以什么编码存的就以什么编码取出 内存固定使用unicode编码, 我们可以控制的编码是往硬盘存放或者基于网络传输选择编码。 2.数据是最先产生于内存中,是unicode格式,要想传输需要转成bytes格式 unicode >encode (utf 8) >bytes 拿 ...
分类:其他好文   时间:2019-10-03 10:33:12    阅读次数:87
PAT Advanced 1153 Decode Registration Card of PAT (25 分)
A registration card number of PAT consists of 4 parts: the 1st letter represents the test level, namely, T for the top level, A for advance and B for ...
分类:其他好文   时间:2019-10-02 19:02:59    阅读次数:95
python字典中键值对的值为中文,打印成转义字符,怎么解决
今天是2019-10-02,学习代码第二天. python字典中键值对中有中文,打印的时候,发现成转义字符了.查了好久,解决.记录一下.useful. 今日份代码: 主要是第17行的repr(**).decode('string_escape')发挥了真正的威力.最后控制台的输出: 开始搜索了强制转 ...
分类:编程语言   时间:2019-10-02 16:28:48    阅读次数:297
python接口测试中—Requests模块的使用
Requests模块的使用 中文文档API:http://2.python-requests.org/en/master/ 1、发送get、post请求 2、响应的属性 查看响应内容 response.text 属性 respone.content.decode('utf8') 属性,字节形式的需要 ...
分类:编程语言   时间:2019-10-01 20:19:40    阅读次数:146
xpath案例 爬取58出租房源信息&解析下载图片数据&乱码问题
58二手房解析房源名称 爬取彼岸图网图片 乱码问题: 1.整体 - response = requests.get(url=xxx,headers=xxx) -response.encoding = 'utf-8' 2. 单独 - xxx.encode('iso-8859-1').decode('g ...
分类:其他好文   时间:2019-09-30 14:46:53    阅读次数:112
python2项目出现的错误(UnicodeDecodeError)
跑了一个python2的ERP 刚启动django就出现了bug UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1 无从改起 赶紧去百度了一下 原来是大家都有这个问题 python2.7解释器自带问题 所以 ...
分类:编程语言   时间:2019-09-28 23:13:07    阅读次数:125
encode和decode的区别
在运行的时候,有时候会报编码错误,本文就来研究一下这个问题。 为什么会出现乱码呢?因为在文件存的时候格式和读取时候格式不一致就会乱码了。 字符串在python内部的表示是unicode编码,也可以说现在的内存是unicode编码格式,硬盘是utf-8。平常的数据操作都是先把数据读取到内存中,所以内存 ...
分类:Web程序   时间:2019-09-26 18:43:42    阅读次数:102
2985条   上一页 1 ... 39 40 41 42 43 ... 299 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!