Daily Python Projects

Daily Python Projects

Extract the first sentence of every text file with Python

Level: Real-World

Ardit Sulce's avatar
Ardit Sulce
Apr 16, 2024
∙ Paid

Project Brief

Your task for this project is to write a Python script that extracts and prints out the first sentence of each text file.

Step-by-Step Instructions

  1. Download these text files and place them in a directory named “texts”. Each text file has a few sentences inside:

  2. Write a Python script that grabs the first sentence of each text file and prints the sentence in the terminal.

Expected Output

Keep reading with a 7-day free trial

Subscribe to Daily Python Projects to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Ardit Sulce
Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture