🤑 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
    • 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
  • 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.

    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.