The Python Papers

The Python Papers

Share this post

The Python Papers
The Python Papers
Python 101 - Expanding Paths and Variables
Copy link
Facebook
Email
Notes
More

Python 101 - Expanding Paths and Variables

Mike Driscoll's avatar
Mike Driscoll
Aug 21, 2023
∙ Paid
8

Share this post

The Python Papers
The Python Papers
Python 101 - Expanding Paths and Variables
Copy link
Facebook
Email
Notes
More
Share

Working with file and folder paths in Python can take time and effort. Fortunately, the Python programming language has a couple of great packages to help you!

This tutorial will teach you how to expand an initial path component, such as a tilde (~). You will also learn how to expand/replace environment variables such as $USERNAME or $TEMPDIR.

You will le…

Keep reading with a 7-day free trial

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

Already a paid subscriber? Sign in
© 2025 Mike Driscoll
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More