Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • 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
    Jason Anders
    145,864 Points

    Trying to master Python

    Posted August 13, 2017 5:17pm by Jason Anders
    Jason Anders
    145,864 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.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord