I have a function that returns a list:
def get_all_newids() -> list:
return list(group_dict.values())
When I'm trying to append this list on assignment it assigns None
:
grpids = get_all_newids().append('42') # None
If I append after the assignment everything works as expected:
grpids = get_all_newids()
grpids.append('42') # ['33', '42']
Just wondering why exactly this is happening. And is there any way to do this in one-liner?