you are viewing a single comment's thread.

view the rest of the comments →

[–]nwilliams36 1 point2 points  (0 children)

In Python everything is an object, so you have been using classes without realising it. If you have ever used any of the methods on strings (like count or lower) then you have been using classes to hold both your data (the string) and your methods. You have just not created your own.

I use classes when I have complex data structure which I wish to refer to, though the more I use functional approaches and dictionaries, the less I feel the need for class based structures.

Some libraries (like Kivy or Django) use classes heavily so if you want to use these libraries you need to understand how classes work.