fork download
  1. test={"a":[], "b":[[],[]], "c": [1,[1]], "d": [{},""],"e": [""], "f": [1]}
  2.  
  3. def empty(varlist):
  4. if varlist == []:
  5. return True
  6. else:
  7. for ele in varlist:
  8. yield bool(empty(ele))
  9.  
  10.  
  11. keys=test.keys()
  12. for key in keys:
  13. if empty(test[key]): print key, " ", test[key]," Empty"
  14. else: print key, " ", test[key], " Not Empty"
  15.  
  16.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/py_compile.py", line 117, in compile
    raise py_exc
py_compile.PyCompileError: SyntaxError: 'return' with argument inside generator (prog.py, line 8)

stdout
Standard output is empty