::: {#navbar .navbar .navbar-default .navbar-fixed-top role="navigation"}
::: {.container}
::: {.navbar-header}
[]{.icon-bar} []{.icon-bar} []{.icon-bar}

<div>

[![](../_static/img/RAIcon.png)](/runestone/default/user/login){.brand-logo}
[fopp](../index.html){#rs-book-toc-link .navbar-brand}

</div>
:::

::: {.navbar-collapse .collapse .navbar-ex1-collapse}
-   
-   []{#ad_warning}
-   []{#browsing_warning}
-   
-   [*[Search]{.visuallyhidden
    aria-label="Search"}*](#){.dropdown-toggle}
    -   [Table of Contents](../index.html)

    -   [Book Index](../genindex.html)

    -   

    -   ::: {.input-group}
        :::
-   
-   [*[User]{.visuallyhidden aria-label="User"}*](#){.dropdown-toggle}
    -   []{.loggedinuser}

    -   

    -   [Course Home](/ns/course/index)

    -   [Assignments](/assignment/student/chooseAssignment)

    -   [Practice](/runestone/assignments/practice)

    -   [[Peer Instruction
        (Instructor)](/runestone/peer/instructor.html)]{#inst_peer_link}

    -   [Peer Instruction (Student)](/runestone/peer/student.html)

    -   

    -   [Change Course](/runestone/default/courses)

    -   

    -   [[Instructor\'s
        Page](/runestone/admin/index)]{#ip_dropdown_link}

    -   [Progress Page](/runestone/dashboard/studentreport)

    -   

    -   [Edit Profile](/runestone/default/user/profile){#profilelink}

    -   [Change
        Password](/runestone/default/user/change_password){#passwordlink}

    -   [Register](/runestone/default/user/register){#registerlink}

    -   [Login](#)

    -   ::: {.slider .round}
        :::

        Dark Mode
-   
-   [[*[Scratch Activecode]{.visuallyhidden
    aria-label="Scratch Activecode"}*](javascript:runestoneComponents.popupScratchAC())]{#scratch_ac_link}
-   
-   [*[Help]{.visuallyhidden aria-label="Help"}*](#){.dropdown-toggle}
    -   [FAQ](http://runestoneinteractive.org/pages/faq.html)
    -   [Instructors Guide](https://guide.runestone.academy)
    -   
    -   [About Runestone](http://runestoneinteractive.org)
    -   [Report A
        Problem](/runestone/default/reportabug?course=fopp&page=toctree)
-   

```{=html}
<!-- -->
```
-   
-   [This Chapter](../index.html){.dropdown-toggle}
    -   [10.1 Introduction: Working with Data
        Files](intro-WorkingwithDataFiles.html){.reference .internal}
    -   [10.2 Reading a File](ReadingaFile.html){.reference .internal}
    -   [10.3 Alternative File Reading
        Methods](AlternativeFileReadingMethods.html){.reference
        .internal}
    -   [10.4 Iterating over lines in a
        file](Iteratingoverlinesinafile.html){.reference .internal}
    -   [10.5 Finding a File in your
        Filesystem](FindingaFileonyourDisk.html){.reference .internal}
    -   [10.6 Using with for Files](With.html){.reference .internal}
    -   [10.7 Recipe for Reading and Processing a
        File](FilesRecipe.html){.reference .internal}
    -   [10.8 Writing Text Files](WritingTextFiles.html){.reference
        .internal}
    -   [10.9 CSV Format](CSVFormat.html){.reference .internal}
    -   [10.10 Reading in data from a CSV
        File](ReadingCSVFiles.html){.reference .internal}
    -   [10.11 Writing data to a CSV
        File](WritingCSVFiles.html){.reference .internal}
    -   [10.12 👩‍💻 Tips on Handling
        Files](WPTipsHandlingFiles.html){.reference .internal}
    -   [10.13 Glossary](Glossary.html){.reference .internal}
    -   [10.14 Exercises](Exercises.html){.reference .internal}
    -   [10.15 Chapter Assessment](ChapterAssessment.html){.reference
        .internal}
-   
-   
:::
:::
:::

::: {#continue-reading .container}
:::

::: {#main-content .container role="main"}
::: {#files .section}
[10. ]{.section-number}Files[¶](#files "Permalink to this heading"){.headerlink}
================================================================================

::: {.toctree-wrapper .compound}
[Files]{.caption-text}

-   [10.1. Introduction: Working with Data
    Files](intro-WorkingwithDataFiles.html){.reference .internal}
    -   [10.1.1. Learning
        Goals](intro-WorkingwithDataFiles.html#learning-goals){.reference
        .internal}
    -   [10.1.2.
        Objectives](intro-WorkingwithDataFiles.html#objectives){.reference
        .internal}
-   [10.2. Reading a File](ReadingaFile.html){.reference .internal}
-   [10.3. Alternative File Reading
    Methods](AlternativeFileReadingMethods.html){.reference .internal}
-   [10.4. Iterating over lines in a
    file](Iteratingoverlinesinafile.html){.reference .internal}
-   [10.5. Finding a File in your
    Filesystem](FindingaFileonyourDisk.html){.reference .internal}
-   [10.6. Using `with`{.docutils .literal .notranslate} for
    Files](With.html){.reference .internal}
-   [10.7. Recipe for Reading and Processing a
    File](FilesRecipe.html){.reference .internal}
-   [10.8. Writing Text Files](WritingTextFiles.html){.reference
    .internal}
-   [10.9. CSV Format](CSVFormat.html){.reference .internal}
-   [10.10. Reading in data from a CSV
    File](ReadingCSVFiles.html){.reference .internal}
-   [10.11. Writing data to a CSV File](WritingCSVFiles.html){.reference
    .internal}
-   [10.12. 👩‍💻 Tips on Handling
    Files](WPTipsHandlingFiles.html){.reference .internal}
-   [10.13. Glossary](Glossary.html){.reference .internal}
-   [10.14. Exercises](Exercises.html){.reference .internal}
    -   [10.14.1. Contributed
        Exercises](Exercises.html#contributed-exercises){.reference
        .internal}
-   [10.15. Chapter Assessment](ChapterAssessment.html){.reference
    .internal}
:::
:::

::: {style="width: 100%"}
::: {ea-publisher="runestoneacademy" ea-type="image" style="display: flex; justify-content: center"}
:::
:::

::: {#scprogresscontainer}
You have attempted []{#scprogresstotal} of []{#scprogressposs}
activities on this page

::: {#subchapterprogress aria-label="Page progress"}
:::
:::

-   [[](../TransformingSequences/week4a1.html)]{#relations-prev}
-   [[](intro-WorkingwithDataFiles.html)]{#relations-next}
:::

::: {.container}
[]{#numuserspan}[]{.loggedinuser} \| [Back to top](#)

© Copyright 2017 bradleymiller. Created using
[Runestone](http://runestoneinteractive.org/) 7.2.10.
:::
