fork(2) download
  1. import json
  2.  
  3. the_json = """
  4. [
  5. {
  6. "ename": "mark",
  7. "url": "Lennon.com"
  8. },
  9. {
  10. "ename": "egg",
  11. "url": "Lennon.com"
  12. }
  13. ]
  14. """
  15. # using del
  16. data = json.loads(the_json)
  17. del data[0]
  18. print(data)
  19.  
  20. data = json.loads(the_json)
  21. for item in data:
  22. if item['enam
Runtime error #stdin #stdout #stderr 0.01s 7724KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
  File "prog.py", line 22
    if item['enam
                ^
SyntaxError: EOL while scanning string literal