def get_thing(item, object): for i in range(item): object.append(i) return object def main(): thing = [] get_thing(5, thing) print(thing) main()