Content · Programming · Python

Python Your First Programming Workspace: Files, Folders, and Extensions

A tidy workspace makes it easier to find source files, run commands, and understand where results are saved. Learn the essential ideas and try a practical example.

2 views Published Oct 17, 2026 Updated Oct 18, 2026 Admin

A tidy workspace makes it easier to find source files, run commands, and understand where results are saved.

Understanding the Concept


Create a top-level folder under your user account, then a separate subfolder for each practice project. Use descriptive file names ending in .py for source code. You may also encounter .txt for plain text, .json for structured data, and .ipynb for notebooks. Do not assume that changing a file extension converts its contents; a .py file must still contain valid Python source. Keep project-specific data in folders clearly named for its role.

When and Why You Would Use This


The following is an illustrative folder structure for an early set of exercises. Each project can use a separate virtual environment if necessary, though very small examples may share a learning workspace.

Practical Example


PythonProjects/
    greetings/
        hello.py
    calculators/
        area.py
        notes.txt
    experiments/
        trial.py

Understanding the Example


This layout is a diagram, not Python source. The important relationships are that hello.py belongs to greetings and area.py belongs to calculators. Later lessons will use paths to access other files.

Try It Yourself


Create the folder layout shown above and open one of the folders as a PyCharm project.

Common Beginner Mistakes


  • Saving every experiment with the same name in Downloads.
  • Changing extensions without checking the real file content.
  • Using spaces and punctuation-heavy project names that complicate terminal commands.

Key Takeaways


  • Use a dedicated workspace with descriptive project folders.
  • Name Python source files with .py extensions.
  • Treat file extensions as conventions, not as automatic format converters.
Share this resourceSend this page to someone who may find it useful.