If you are literally trying to return the JSON list in the bulb, and you are pretty sure that your variable is a list, then a simple way (where bin is a list of 1 and 0):
return jsonify({'ans':bin}), 201
Finally, in your client you will get something like
{"ans": [0.0, 0.0, 1.0, 1.0, 0.0]}
Yor Jaggy CastaΓ±o Jul 06 '17 at 6:04 2017-07-06 06:04
source share