Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Pratham Patel
Pratham Patel
4,976 Points

why is Kenneth using a txt file instead of a python file. And where would i use this in my python career

Please help

Pratham Patel
Pratham Patel
4,976 Points

Its the first video in regular expressions course

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

In the first video Reading Files, a txt file is used to signify the file contents is regular text and is not Python code. This is a common practice.

Often the data input for a python program is generated by another program. This input data is usually a text file, or a Comma Separates Values (CSV) file, a special formatted text file you'll learn about later in the course.