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

🤑 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

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

  • 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
    • 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
  • 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
    • Showing results for:
    • Python
    • Python for File Systems
    • Navigation
    • Dir Contents
    • Close
  • S M Tasfiqul Asif
    S M Tasfiqul Asif
    11,514 Points

    why my code is not working?

    Posted on Sep 15, 2022 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 on Nov 8, 2020 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 on Nov 14, 2019 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 on Oct 9, 2019 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 on Feb 23, 2019 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 on Apr 5, 2018 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 on Mar 8, 2018 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 on Dec 17, 2017 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 on Nov 9, 2017 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 on Sep 24, 2017 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 on Aug 19, 2017 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 on Aug 13, 2017 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.