摘要: 一、反射对象的实例变量/绑定方法 import time class Perosn(): def __init__(self, name, birth): self.name = name self.birth = birth @property def age(self): return time 阅读全文
posted @ 2020-11-15 20:56 中南毛毛虫 阅读(91) 评论(0) 推荐(0)
摘要: 1、unicode、utf-8、gbk之间的相互转换 aa = '今天的天气是多云' # utf-8到Unicode b = aa.encode('utf-8') print(b) # Unicode到utf-8 c = b.decode('utf-8') print(c) # Unicode到gb 阅读全文
posted @ 2020-11-15 09:45 中南毛毛虫 阅读(41) 评论(0) 推荐(0)