python staticmethod and classmethod Though classmethod and staticmethod are quite similar, there’s a slight difference in usage for both entities: classmethod must have a reference to a class object as the first parameter, whereas staticmethod can ha…
参考自 python2和python3中的range区别 - CSDN博客 http://blog.csdn.net/xiexingshishu/article/details/48581379 python2中的range返回的是一个列表 python3中的range返回的是一个迭代值 for i in range(1,10)在python2和python3中都可以使用,但是要生成1-10的列表,就需要用list(range(1,10)) 输出abcde的子序列,如果用python3 s =…