Bob Age.py

>>> json.dump(rec, fp=open('testjson.txt', 'w'), indent=4) >>> print(open('testjson.txt').read()) { "job": [ "dev", "mgr" ], "name": { "last": "Smith", "first": "Bob" }, "age": 40.5 } >>> P = json.load(open('testjson.txt')) >>> P
JSON is a newer and emerging data interchange format, which is both programming-language-neutral and supported by a variety of systems.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.