摘要:
1 #!/usr/bin/env python 2 import random 3 temp = "" 4 for i in range(6): 5 num = random.randrange(0, 4) 6 if num == 3 or num == 1: 7 ret1 = random.randrange(0, 10) 8 t... 阅读全文
摘要:
1 #!/usr/bin/env python 2 #ascii,对象类中找__repr__,获取其返回值 3 class Foo : 4 def __repr__(self): 5 return "hello" 6 7 obj = Foo() 8 r = ascii(obj) 9 print(r ) 阅读全文