Back to Lesson

Dynamic Paths

Create standardized filepath constructs exploiting join mechanics.

Instructions

  • Given
    folders = ["var", "www", "html", "index.html"]
    .
  • Construct a file path that groups the fragments using the forward slash
    /
    .
  • Prepend a
    /
    so it acts as an absolute root path.
  • Print the formatted string.
main.py
main.py