Ad
  • Custom User Avatar

    arr =[0, 'a', '0', 1, False, 'a', 1]

    l = [i for i, j in enumerate(arr) if j == 0]
    print(l)

    l = [0,4] result

    expected [0]

    but i dont want False to be treated as zero.