What difference does it make? I imagine they both work. The first one is more Pythonic and in the longer term you will find it easier to maintain.
If you write procedural code, like your second example eventually it will become more spaghetti-like and you split it into classes to maintain it. Much easier to start with classes.