V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
xiaoheijw
V2EX  ›  Python

Python 面试题分享

  •  2
     
  •   xiaoheijw · 2019-03-02 12:00:44 +08:00 · 6210 次点击
    这是一个创建于 1872 天前的主题,其中的信息可能已经有所发展或是发生改变。

    收集了一些 python 的面试题,个人认为是比较全面的 https://github.com/kenwoodjw/python_interview_question 欢迎大家补充。答案还在更新中

    20 条回复    2019-03-05 18:31:29 +08:00
    Hk4Fun
        1
    Hk4Fun  
       2019-03-02 12:15:07 +08:00 via Android
    支持
    eric1202
        2
    eric1202  
       2019-03-02 12:25:03 +08:00
    stared
    Laodaige
        3
    Laodaige  
       2019-03-02 12:27:16 +08:00
    stared
    shihaoyu
        4
    shihaoyu  
       2019-03-02 16:41:58 +08:00 via Android
    支持
    www5070504
        5
    www5070504  
       2019-03-02 17:20:59 +08:00
    stared
    BeanWei
        6
    BeanWei  
       2019-03-02 17:25:32 +08:00 via Android
    👋👍
    911speedstar
        7
    911speedstar  
       2019-03-02 18:39:16 +08:00
    赞一个 顺路问下,楼主有没有爬虫的面试题
    congeec
        8
    congeec  
       2019-03-02 20:16:11 +08:00
    Singleton 那儿学到新东西了
    mscb
        9
    mscb  
       2019-03-02 20:46:15 +08:00
    谢谢
    meowoo
        10
    meowoo  
       2019-03-02 21:35:13 +08:00
    stared
    xiaoheijw
        11
    xiaoheijw  
    OP
       2019-03-02 23:30:55 +08:00
    @911speedstar 有部分爬虫题目
    rust
        12
    rust  
       2019-03-03 00:24:16 +08:00 via Android
    绝大多数我都会,是不是算入门了...我主要使用 Rust...
    Allianzcortex
        13
    Allianzcortex  
       2019-03-03 05:50:27 +08:00 via iPhone
    并发和并行这里还是看 @laike9m 的这篇文章: https://laike9m.com/blog/huan-zai-yi-huo-bing-fa-he-bing-xing,61/ 。 [ IO 密集型操作使用并发更好。CPU 运算量大的程序,使用并行会更好] 这里应该是多进程更适合 cpu bound,多线程更适合 io bound ?
    bugcoder
        14
    bugcoder  
       2019-03-03 06:46:47 +08:00
    在 python 里面,还有什么场景需要用到 Singleton 么?
    https://stackoverflow.com/questions/31875/is-there-a-simple-elegant-way-to-define-singletons 这儿最 upvote 的回答是喷 singleton 的
    laike9m
        15
    laike9m  
       2019-03-03 07:00:45 +08:00
    @Allianzcortex 习惯了,要理解透彻这个问题也不是那么容易。。其实“线程是并发还是并行,进程是并发还是并行?”这个问法就很奇怪,估计是想考察 GIL 吧
    diubo
        16
    diubo  
       2019-03-03 10:23:25 +08:00
    stared
    ManjusakaL
        17
    ManjusakaL  
       2019-03-03 23:15:41 +08:00
    @laike9m 这个题考 GIL 也有点牵强
    而且这套面试题很多题感觉给我 corner case 的感觉,,除了玩语言的,很少有人会追着这些地方去问。无聊且价值不大
    echoyangjx
        18
    echoyangjx  
       2019-03-04 13:40:46 +08:00 via Android
    支持
    ManjusakaL
        19
    ManjusakaL  
       2019-03-05 18:11:45 +08:00
    认真看了下。。

    ![image]( https://user-images.githubusercontent.com/7054676/53797886-143eea80-3f72-11e9-9b06-1e8add83b842.png)

    这样的回答,真的不会误导人么?。。
    ManjusakaL
        20
    ManjusakaL  
       2019-03-05 18:31:29 +08:00
    认真看了下。。。很多原理性的错误。。要是面试看这个,怕是真的会很惨。。

    https://github.com/kenwoodjw/python_interview_question/issues
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5567 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 08:08 · PVG 16:08 · LAX 01:08 · JFK 04:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.