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 trialOmar Farag
4,573 PointsWhat are classes in Python?
So I'm in a python track and I just finished one part of the course and went to the next. Kenneth starts mentioning classes but I have no idea what they are, and he never mentioned them before. Any idea on what they are and what they do? Thanks
1 Answer
Urs Merkel
Courses Plus Student 4,552 PointsI know, it won't satisfy you but a really good answer to you question what classes are is listed here: https://docs.python.org/3/tutorial/classes.html
So in generell it is as in all other programming languages as well, classes are objects and class-objects group functions. You can import class-objects to other python scripts/ classes and so on to use the functions from a class-object.
more specific here: https://docs.python.org/3/tutorial/classes.html#class-definition-syntax
"from re import is'." imports the class is from the python-package re
Omar Farag
4,573 PointsOk, thanks
Omar Farag
4,573 PointsOmar Farag
4,573 PointsI also have no idea what 'from re import is'. Does anyone know the course where these things are introduced? I can't seem to find it.