IT入门 > 面试题 > python题库 >
  • lambda函数

    2019/07/25 点击:2429

    其实就是一个匿名函数,为什么叫lambda?因为和后面的函数式编程有关. 推荐: [知乎](http://www.zhihu.com/question/20125256)

  • Python函数式编程

    2019/07/25 点击:966

    这个需要适当的了解一下吧,毕竟函数式编程在Python中也做了引用. 推荐: [酷壳](http://coolshell.cn/articles/10822.html) python中函数式编程支持: filter 函数的功能相当于过滤器。调用一个布尔函数

  • Python里的拷贝

    2019/07/25 点击:3089

    引用和copy(),deepcopy()的区别 import copya = [1, 2, 3, 4, ['a', 'b']] #原始对象b = a #赋值,传对象的引用c = copy.copy(a) #对象拷贝,浅拷贝d = copy.deepcopy(a) #对象拷贝,深拷贝a.append(5) #修改对象aa[4

  • Python垃圾回收机制

    2019/07/25 点击:4785

    Python GC主要使用引用计数(reference counting)来跟踪和回收垃圾。在引用计数的基础上,通过“标记-清除”(mark and sweep)解决容器对象可能产生的循环引用问题,通过“分代回收”(

  • Python的List

    2019/07/25 点击:7031

    推荐: http://www.jianshu.com/p/J4U6rR 在Python中list特别有用。让我们来看下list的内部是如何实现的。 来看下面简单的程序,在list中添加一些整数并将他们打印出来。 L = []L.append(1)L.append(2)L.

  • Python的is

    2019/07/25 点击:6221

    is是对比地址,==是对比值

  • read,readline和readlines

    2019/07/25 点击:3193

    * read 读取整个文件 * readline 读取下一行,使用生成器方法 * readlines 读取整个文件到一个迭代器以供我们遍历

  • Python2和3的区别

    2019/07/25 点击:2537

    推荐:[Python 2.7.x 与 Python 3.x 的主要差异](http://chenqx.github.io/2014/11/10/Key-differences-between-Python-2-7-x-and-Python-3-x/)

  • super init

    2019/07/25 点击:2619

    super() lets you avoid referring to the base class explicitly, which can be nice. But the main advantage comes with multiple inheritance, where all sorts of fun stuff can happen. See the standard docs on super if you haven't already. Note t

  • range and xrange

    2019/07/25 点击:4530

    都在循环时使用,xrange内存性能更好。 for i in range(0, 20): for i in xrange(0, 20):