Python is a function Orientated Language. ( Python 3 is less but its still has that orientation )
Because python is a scripting language and their Object Orientated Features are not that expanded like a "normal" Object Orientated Language like C# or Java.
The first one is the approach of Functional Programming language (e.g. Python ) and the second one is the approach for Object orientated languages (e.g. Java, C#)