美文网首页
Python 碎片知识/趣味问题

Python 碎片知识/趣味问题

作者: John_Tsemin | 来源:发表于2019-05-08 14:25 被阅读0次
    1. 如何用一行python代码将[true, false, false, true, true] 转成 [0,3,4]?

    听说答出来能够进入麦肯锡哟😀

    
    [i for i in range(len([True, False, False, True, True])) if [True, False, False, True, True][i]]
    

    相关文章

      网友评论

          本文标题:Python 碎片知识/趣味问题

          本文链接:https://www.haomeiwen.com/subject/sxbmoqtx.html