<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python-Files on Ghafoor's Personal Blog</title><link>http://ghafoorsblog.com/tags/python-files/</link><description>Recent content in Python-Files on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>noreply@example.com (AG Sayyed)</managingEditor><webMaster>noreply@example.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><lastBuildDate>Fri, 31 Oct 2025 11:40:28 +0000</lastBuildDate><atom:link href="http://ghafoorsblog.com/tags/python-files/index.xml" rel="self" type="application/rss+xml"/><item><title>Writing Files</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/002-writing-files/</link><pubDate>Thu, 24 Jul 2025 12:07:22 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/002-writing-files/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores writing files in Python, covering the open function, file objects, writing methods, appending, copying files, and best practices for file creation and data output.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-writing-files"&gt;Introduction to Writing Files&lt;/h2&gt;
&lt;p&gt;Writing files in Python is essential for data output and storage. The built-in &lt;code&gt;open()&lt;/code&gt; function creates a file object, allowing data to be written using various methods.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="opening-files-for-writing"&gt;Opening Files for Writing&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;open()&lt;/code&gt; function requires the file path and mode:&lt;/p&gt;</description></item><item><title>Reading Files</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/001-reading-files/</link><pubDate>Thu, 24 Jul 2025 12:04:15 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/07-python-datascience/04-module/001-reading-files/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores reading files in Python, covering the open function, file objects, reading methods, and best practices for handling and extracting data from text files.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-reading-files"&gt;Introduction to Reading Files&lt;/h2&gt;
&lt;p&gt;Reading files in Python is essential for data extraction and processing. The built-in &lt;code&gt;open()&lt;/code&gt; function creates a file object, allowing access to file data using various methods.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="opening-files"&gt;Opening Files&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;open()&lt;/code&gt; function requires the file path and mode:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Mode&lt;/th&gt;
 &lt;th&gt;Purpose&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&amp;lsquo;r&amp;rsquo;&lt;/td&gt;
 &lt;td&gt;Read&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&amp;lsquo;w&amp;rsquo;&lt;/td&gt;
 &lt;td&gt;Write&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&amp;lsquo;a&amp;rsquo;&lt;/td&gt;
 &lt;td&gt;Append&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Example:&lt;/p&gt;</description></item></channel></rss>