The Self-Taught Developer: Tips and Tricks for Anyone to Learn Programming by Tommy Chheng
Author:Tommy Chheng [Chheng, Tommy]
Language: eng
Format: epub
Published: 2020-12-15T23:00:00+00:00
Examples of Writing and Reading Data
CSV
import csv with open('books.csv', 'wt') as outfile: writer = csv.writer(outfile, delimiter=',') writer.writerow(['1', 'a tale of two cities']) writer.writerow(['2', 'the three body problem']) with open('books.csv') as infile: reader = csv.reader(infile, delimiter=",") for row in reader: print(row)
JSON
import json data = {'books': [{'id': 1, 'title': 'a tale of two cities'}, {'id': 2, 'title': 'the three body problem'}]} with open('books.json', 'w') as outfile: json.dump(data, outfile) with open('books.json') as infile: data = json.load(infile) for book in data['books']: print(book)
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Windows Terminal Tips, Tricks, and Productivity Hacks by Will Fuqua(1522)
Augmented Reality with Unity AR Foundation by Jonathan Linowes(1274)
Sketching User Experiences by Buxton Bill(640)
Object-Role Modeling Fundamentals: A Practical Guide to Data Modeling with ORM by Terry Halpin(614)
Beginning AutoCAD 2020 Exercise Workbook by Cheryl R. Shrock(578)
You Donât Know JS: Up & Going by Kyle Simpson(561)
SketchUp For Dummies by Bill Fane & Mark Harrison & Josh Reilly(527)
Adobe InDesign for Absolute Beginner: Tips and Techniques to Creating Professional Books and Magazines for Online and Desktop Publishing using InDesign by Scott Walter & Scott Walter(527)
Windows 10: The Missing Manual by Pogue David(522)
AI 2041: Ten Visions for Our Future by Kai-Fu Lee & Chen Qiufan(504)
100 Principles of Game Design by unknow(491)
Advanced Game Design by Michael Sellers(485)
Research Methods in Human-Computer Interaction by unknow(476)
TensorFlow 2.0 Computer Vision Cookbook by Jesus Martinez(471)
The Rainbow Stack: A Casual Guide to UX Design by Jawara Joseph(469)
Photoshop Elements 12 All-in-One For Dummies by Barbara Obermeier & Ted Padova(453)
Mastering InDesign Templates by Murphy Monica & Knorr Mancini Margot(452)
Hands-On Data Visualization by Jack Dougherty(452)
Connected, Intelligent, Automated: The Definitive Guide to Digital Transformation and Quality 4.0 by Radziwill N. M(422)
