🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Community Projects
    • Live Sessions
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Community Projects Live Sessions Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • S M Tasfiqul Asif
    S M Tasfiqul Asif
    11,514 Points

    why my code is not working?

    Posted September 15, 2022 4:43am by S M Tasfiqul Asif
    S M Tasfiqul Asif
    11,514 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    1 Answer

  • Taylor Fritz
    Taylor Fritz
    13,265 Points

    How to check if file names exist in a directory list?

    Posted November 8, 2020 9:55pm by Taylor Fritz
    Taylor Fritz
    13,265 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    2 Answers

  • Cam Treschuk
    Cam Treschuk
    7,378 Points

    What is wrong with my code?

    Posted November 14, 2019 2:28pm by Cam Treschuk
    Cam Treschuk
    7,378 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    1 Answer

  • jdee
    jdee
    6,655 Points

    Hey guys, For this challenge, feedback is limited, so it's difficult to debug. With the below code, please tell me wha

    Posted October 9, 2019 4:25pm by jdee
    jdee
    6,655 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    2 Answers

  • Justin Walters
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Justin Walters
    PHP Development Techdegree Student 18,894 Points

    Answer passed the first time, but not any other time...

    Posted February 23, 2019 8:14pm by Justin Walters
    .a{fill-rule:evenodd;}techdegree
    Justin Walters
    PHP Development Techdegree Student 18,894 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    1 Answer

  • Jonathan Beard
    Jonathan Beard
    1,681 Points

    Need assistance with dir_contains function

    Posted April 5, 2018 8:06pm by Jonathan Beard
    Jonathan Beard
    1,681 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    5 Answers

  • JUSTIN ADAMS
    JUSTIN ADAMS
    12,953 Points

    Create a function named dir_contains takes a path to a directory and a list of file names. If all of the file names exis

    Posted March 8, 2018 9:07pm by JUSTIN ADAMS
    JUSTIN ADAMS
    12,953 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    3 Answers

  • debasis nath
    debasis nath
    11,650 Points

    Bummer! Got `False` for some existing paths Restart

    Posted December 17, 2017 7:48am by debasis nath
    debasis nath
    11,650 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    0 Answers

  • Jim Haff
    Jim Haff
    5,246 Points

    Got `True` for a non-existent path - in python file system My code is the following, I am not able to break it

    Posted November 9, 2017 5:57am by Jim Haff
    Jim Haff
    5,246 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    0 Answers

  • leakedmemory
    leakedmemory
    12,178 Points

    Do I Not Understand the Problem Statement?

    Posted September 24, 2017 3:31am by leakedmemory
    leakedmemory
    12,178 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    1 Answer

  • Keith Ostertag
    Keith Ostertag
    16,619 Points

    Help needed with "Create a function named dir_contains " ...

    Posted August 19, 2017 4:17pm by Keith Ostertag
    Keith Ostertag
    16,619 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    1 Answer

  • Jason Anders
    MOD
    Jason Anders
    Treehouse Moderator 145,860 Points

    Trying to master Python

    Posted August 13, 2017 5:17pm by Jason Anders
    Jason Anders
    Treehouse Moderator 145,860 Points
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.