标签:int print 用法 str bsp nbsp strong elf sample
Python 3.5.6
1 def b(): 2 print(‘123‘) 3 def a(fn): 4 if callable(fn): 5 fn() 6 a(b) 7 8 class Sample: 9 def q(self): 10 print(‘q‘) 11 def w(self,fn): 12 if callable(fn): 13 fn() 14 def print(self): 15 self.w(self.q) 16 Sample().print() 17 Sample().w(b) 18 a(Sample().q)
结果:符合预期
标签:int print 用法 str bsp nbsp strong elf sample
原文地址:https://www.cnblogs.com/xunhanliu/p/10990396.html