I have a list which I appended a value and then use the new list to call a function, I would like to do that in one line but is not working...
list = ['a', 'b']
my_funtion(list.append('c'))
my_function
received a None
instead the list with the three letters which is correct because from doc:
def append(self, p_object):
""" L.append(object) -> None -- append object to end """
pass
it works if I do:
list = ['a', 'b']
list.append('c')
my_funtion(list)
I would like to know if there is way to simplify the code with my original sample.