Make list of arrays in python

final_array = array_camera.append(TD_camera)
final_direction = array_direction.append(TD_direction)

The above 2 lines doesn’t work the way you expect.

append() function of list doesn’t return anything. It adds data at the end of the list object through which the append() was called.

So final_array & final_direction will be None.

I think you just need to append data to final_array & final_direction. Like this

final_array ,final_direction =[],[]
.....
.....
final_array.append(TD_camera)
final_direction.append(TD_direction)

Leave a Comment