Jan-07-2019, 02:43 AM
The test code isn't working because you're comparing a list to a string. Removing the quotations makes it work:
#a = [] def append_try(): a = [] for i in range(2): a.append(i) #print(a) return a def main(): b = append_try() if b == [0]: print("0") elif b == [1]: print("1") elif b == [0, 1]: print("2") else: print("it is not working") main()As for why your code isn't returning the b values, I suspect it's line 82 of visualize_boxes_and_labels_on_image_array(). Your conditional is nested under the conditional started on line 82. All the prior conditionals I can verify as True, but not that one. You said you made an addition to the code; is this all custom code or is visualize_boxes_and_labels_on_image_array() from a third party module?