Interesting nested for loop behavior when one loop is empty

后端 未结 0 1262
生来不讨喜
生来不讨喜 2020-12-20 06:49

I never would thought this way but today I saw an interesting nested for loop.

d = {\'hot\': {\'hot\'}}
l = [[\'dog\']]
while l and l[0][0] != \'hot\':
    pr         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题