Wakefield's Daily Tips

Compare elements not lists

Lists can’t be compared directly.

So, while locally if a = [1, 1] and b = [1, 1] then a == b is True, online a == b will be false.

If you want to check that two lists are identical, check a[0] == b[0] and a[1] == b[1].

Alternatively, if your arrays contain string variables you could join the lists and compare the results. Happily, "".join(a) == "".join(b) successfully auto translates to a.join("") === b.join("")