check if element exists in 2d list python