Is there a way to make a python function so that you can call it like a method? So say i had variable x
, and I had a function:
def func(y):
return str(y)+"hi"
Then call it like x.func()
and have it take x in as the input?
Is there a way to make a python function so that you can call it like a method? So say i had variable x
, and I had a function:
def func(y):
return str(y)+"hi"
Then call it like x.func()
and have it take x in as the input?