r/PythonLearning • • 28d ago

I don't understand OOP

So i am a teen learning python, and i have learnt about classes, methods and objects, but i don't understand OOP, like what is it, where do we use it?

Please help mee

36 Upvotes

50 comments sorted by

View all comments

1

u/W31337 28d ago

OOP attempts to turn your code into objects that have properties and behaviors. It promotes reuse and scoping these properties and behaviors to an object.

A player in a game can have coordinates as properties and move() or grab() as behaviors.

That said OOP is starting to lose ground because it drowns everything in boilerplate and abstractions. Nevertheless it's worth understanding.