string–>int
1、10进制string转化为int
int(‘12’)
2、16进制string转化为int
int(‘12’, 16)
int–>string
1、int转化为10进制string
str(18)
2、int转化为16进制string
hex(18)
json转化为字典
https://www.cnblogs.com/botoo/p/7929714.html
import json json_str = “”" { “id” : 90, “name” : “python”, “url” : “http://www.v2ex.com/go/python”, “title” : “Python”, “title_alternative” : “Python”, “topics” : 7646, “stars” : 4862, “”" res = json.loads(json_str) print(res[‘id’]) # 90 print(res[‘name’]) # python print(res[‘url’]) # http://www.v2ex.com/go/python
Henry## 字符进制相互转化