Skip to main content

Notice: Workspaces are undergoing maintenance and are temporarily unavailable.

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

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

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

  • 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
  • Hanwen Zhang
    Hanwen Zhang
    20,084 Points

    When we run the python second_app.py, what the "app" works here and why print_hello() from the app.py?

    Posted April 14, 2021 3:24am by Hanwen Zhang
    Hanwen Zhang
    20,084 Points
    • Python
    • Conditional Check

    1 Answer

  • Anthony Costanza
    Anthony Costanza
    2,123 Points

    Huh? Dunder who?

    Posted February 13, 2021 7:49pm by Anthony Costanza
    Anthony Costanza
    2,123 Points
    • Python
    • Conditional Check

    2 Answers

  • Ritu tin
    PLUS
    Ritu tin
    Courses Plus Student 1,461 Points

    What if I import two module then what will the value of __name__ in that case will it be equal to second module???

    Posted July 29, 2020 10:08pm by Ritu tin
    Ritu tin
    Courses Plus Student 1,461 Points
    • Python
    • Conditional Check

    2 Answers

  • Benyamin Kohanchi
    PLUS
    Benyamin Kohanchi
    Courses Plus Student 2,342 Points

    Why would we use dunder main? Just don't import the file? I'm confused.

    Posted July 21, 2020 5:02pm by Benyamin Kohanchi
    Benyamin Kohanchi
    Courses Plus Student 2,342 Points
    • Python
    • Conditional Check

    2 Answers

  • Jonathan Davidson
    Jonathan Davidson
    1,641 Points

    why is the .py not needed?

    Posted June 11, 2020 10:27pm by Jonathan Davidson
    Jonathan Davidson
    1,641 Points
    • Python
    • Conditional Check

    1 Answer

  • Aizah Sadiq
    Aizah Sadiq
    2,435 Points

    Conditional check

    Posted May 16, 2020 5:01pm by Aizah Sadiq
    Aizah Sadiq
    2,435 Points
    • Python
    • Conditional Check

    3 Answers

  • Elena Chen
    Elena Chen
    1,503 Points

    Watched several times of the dunder main but still don't get it

    Posted May 15, 2020 7:53am by Elena Chen
    Elena Chen
    1,503 Points
    • Python
    • Conditional Check

    3 Answers

  • tomtrnka
    tomtrnka
    9,780 Points

    We use this conditional check everytime??

    Posted March 29, 2020 9:27pm by tomtrnka
    tomtrnka
    9,780 Points
    • Python
    • Conditional Check

    1 Answer

  • pratyush raj
    pratyush raj
    7,097 Points

    i am not able to grasp the concept of this video, can someone please explain this in simple words??

    Posted March 4, 2020 8:28am by pratyush raj
    pratyush raj
    7,097 Points
    • Python
    • Conditional Check

    1 Answer

  • mohan Abdul
    PLUS
    mohan Abdul
    Courses Plus Student 1,453 Points

    how does second_app.py get the dunder name '''app''' when the instructor did not type the script? @ approx 3 min 39 sec

    Posted February 20, 2020 5:52pm by mohan Abdul
    mohan Abdul
    Courses Plus Student 1,453 Points
    • Python
    • Conditional Check

    2 Answers

  • Ankush Sharma
    Ankush Sharma
    844 Points

    i am not understanding.Please help

    Posted November 7, 2019 3:41pm by Ankush Sharma
    Ankush Sharma
    844 Points
    • Python
    • Conditional Check

    2 Answers

  • Olebogeng Nkele
    Olebogeng Nkele
    3,018 Points

    Watched this video twice and i still dont get it

    Posted August 28, 2019 7:30am by Olebogeng Nkele
    Olebogeng Nkele
    3,018 Points
    • Python
    • Conditional Check

    4 Answers

  • Murilo de Melo
    Murilo de Melo
    14,456 Points

    print(__name__) in second_app.py prints out '__main__'. Why?

    Posted November 3, 2018 12:19pm by Murilo de Melo
    Murilo de Melo
    14,456 Points
    • Python
    • Conditional Check

    1 Answer

  • Shmuel Zilberman
    Shmuel Zilberman
    1,409 Points

    i dont get the point of this video

    Posted October 28, 2018 6:37pm by Shmuel Zilberman
    Shmuel Zilberman
    1,409 Points
    • Python
    • Conditional Check

    6 Answers

  • givens
    givens
    7,484 Points

    This was so useful!

    Posted October 17, 2018 2:48pm by givens
    givens
    7,484 Points
    • Python
    • Conditional Check

    1 Answer

  • Nick Evershed
    Nick Evershed
    6,429 Points

    print_hello() not defined

    Posted September 15, 2018 9:46pm by Nick Evershed
    Nick Evershed
    6,429 Points
    • Python
    • Conditional Check

    3 Answers

  • Youssef Moustahib
    Youssef Moustahib
    7,779 Points

    Can someone help?

    Posted June 10, 2018 5:34pm by Youssef Moustahib
    Youssef Moustahib
    7,779 Points
    • Python
    • Conditional Check

    2 Answers

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