Premium Only Content

CS50P - Lecture 6 - File I O
TABLE OF CONTENTS
00:00:00 - Introduction
00:00:24 - File I/O
00:01:17 - lists
00:05:54 - open
00:13:55 - with
00:21:39 - sorted
00:29:31 - Comma-Separated Values
00:46:37 - Sort Keys
00:53:01 - Lambda Functions
00:57:13 - csv Library
01:02:17 - csv.reader
01:07:49 - csv.DictReader
01:14:05 - csv.writer
01:16:28 - csv.DictWriter
01:23:00 - Images, PIL library
01:31:42 - Conclusion
An introduction to programming using a language called Python. Learn how to read and write code as well as how to test and "debug" it. Designed for students with or without prior programming experience who'd like to learn Python specifically. Learn about functions, arguments, and return values (oh my!); variables and types; conditionals and Boolean expressions; and loops. Learn how to handle exceptions, find and fix bugs, and write unit tests; use third-party libraries; validate and extract data with regular expressions; model real-world entities with classes, objects, methods, and properties; and read and write files. Hands-on opportunities for lots of practice. Exercises inspired by real-world programming problems. No software required except for a web browser, or you can write code on your own PC or Mac.
Whereas CS50x itself focuses on computer science more generally as well as programming with C, Python, SQL, and JavaScript, this course, aka CS50P, is entirely focused on programming with Python. You can take CS50P before CS50x, during CS50x, or after CS50x. But for an introduction to computer science itself, you should still take CS50x!
-
7:29
CS50 Harvard
27 days agoVariables - CS50P Shorts
19 -
LIVE
vivafrei
55 minutes agoELECTIONS CANADA RESULTS LIVE STREAM WITH VIVA COMMENTARY!!!
3,338 watching -
1:33:55
Glenn Greenwald
6 hours agoGaza Starves, Pro-Israel Propagandists Escalate Extremist Rhetoric and Actions | System Update #444
47.8K71 -
LIVE
megimu32
2 hours agoON THE SUBJECT: This Timeline is Broken: Epstein, Aliens & Summer Anthems
171 watching -
1:02:42
Donald Trump Jr.
7 hours agoMAHA Means Business, Interview with Calley Means | TRIGGERED Ep.237
87.1K41 -
57:50
BonginoReport
4 hours agoFAKE News In A Downward Ratings Spiral - Nightly Scroll w/ Hayley Caronia (Ep.36)
55.6K30 -
LIVE
The Jimmy Dore Show
3 hours agoTrump Tariffs Working As Planned? Trump Open to Raising Taxes on the Rich! w/ Stephen Gardner
10,268 watching -
7:58:02
Dr Disrespect
9 hours ago🔴LIVE - DR DISRESPECT - TRIPLE THREAT CHALLENGE - WZ, PUBG, FORTNITE
137K11 -
LIVE
LIVE WITH CHRIS'WORLD
6 hours agoLIVE WITH CHRIS’WORLD - HERE IS THE KEY TO 100 DAYS OF SUCCESS!
209 watching -
1:54:45
Wayne Allyn Root | The Root Reaction
3 hours agoThe Root Reaction | 28 April 2025
13.5K1