Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Omar Farag4,573 Points
What is __init__ ?
The title says it all. I have no idea what init is for in python. Please help
stjarnanFront End Web Development Techdegree Graduate 56,488 Points
init is a function that runs when your class is initialized, like when you create an instance of a class.
You could use it to set the values of the new instance of a class. So every time you create an instance of a class, init will be used to generate the values and attributes for that instance.
I hope that helps