Find the length of the generator or Does it have an element

后端 未结 0 380
感动是毒
感动是毒 2020-12-22 17:15

Hello i have a Code like Below :

isEmpty = True
for itrat in  generator():
    isEmpty = False
    break
if isEmpty:
    doSomething()
else:
    dosomethingel         


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