By Andy Brown
Download files and exercises for this tutorial from https://www.wiseowl.co.uk/python/videos/python-programming/files-folders/
Python makes reading and writing files and looping over files and folders a joys, as this tutorial (which includes a long worked example towards the end) hopefully will demonstrate!
Chapters
00:00 Topic list
01:20 Syntax for working with files
02:30 Reading from files (basic)
06:10 Better ways to read from files
09:46 Using WITH
11:26 Writing to files
14:50 Looping over files and folders
19:30 A long example
22:08 Getting the list of files
23:48 Printing titles for the output
24:50 Looping over the files
32:24 CSV and JSON files
Python playlist https://youtube.com/playlist?list=PLNIs-AWhQzckGrdnwITFlXGqiXTCAhWWi
If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos you can join this channel to get access to perks:
https://www.youtube.com/channel/UCbi5G5PjWBaQUFy7XU_O7yw/join
Or you can click this link https://www.wiseowl.co.uk/donate?t=1 to make a donation. Thanks for watching!
Visit https://www.wiseowl.co.uk for more online training resources in Microsoft Excel, Microsoft Power BI, DAX, VBA, Python, Visual C#, Microsoft SQL Server, SQL Server Reporting Services SSRS, SQL Server Integration Services SSIS, Microsoft Access and more!