python中的按位取反:https://www.jianshu.com/p/956f1f3c65ee
python将整数转换成二进制形式的方法:https://blog.csdn.net/ACBC12345/article/details/124441879
zfill():https://blog.csdn.net/m0_57394815/article/details/122561351
bin(4).replace("0b","").zfill(8)
list.find() 与 list.rfind() :https://wenku.baidu.com/view/848cf439f28583d049649b6648d7c1c708a10bb2.html
Python中的队列:https://blog.csdn.net/qq_33254766/article/details/109154689
Queue队列中的join()和task_done()的关系:https://blog.csdn.net/weixin_46739549/article/details/123199043
#把字符转为ascii
ord('a')
#把ascii转为字符
chr(ord('a')+1) #b
bisect.bisect(string, i), bisect.bisect_left(), bisect.bisect_right():https://wenku.baidu.com/view/052659f0baf3f90f76c66137ee06eff9aef8491d.html
python 中 str ,repr 用法:https://blog.csdn.net/qq_39355550/article/details/82110661
python 中 str,__len__用法:https://www.cnblogs.com/learningcaiji/p/13796553.html
python内置函数 str(),repr():https://www.cnblogs.com/sddai/p/14884688.html
class Parent(object):
x = 1
class Child1(Parent):
def __str__(self):
return str(self.x * 2)
class Child2(Parent):
def __str__(self):
return str(len(self))
def __len__(self):
return self.x * 3
c1 = Child1()
c2 = Child2()
print(Parent.x, Child1.x, Child2.x, c1, c2)
Child1.x = 2
print(Parent.x, Child1.x, Child2.x, c1, c2)
Parent.x = 3
print(Parent.x, Child1.x, Child2.x, c1, c2)