Both do the same, but neither is a method; the first is a function, the second, an anonymous function that you named by assigning it to a variable.
from the comments:
performance differences are negligible, but more importantly, lambda
functions only support expressions, where's def statements can have
any combination of complex statements in their body. The only purpose
of lambda is for convenience, usually as an argument to a higher order
function, and if you assign lambda functions to a name, that negates
their only use case. Indeed, although it is allowed, it is explicitly
recommended against by PEP8 style guidelines.
~ juanpa.arrivillaga