This is Guatavos solution to Ron's loop: x = [[1,2,3],[2,4,6],[8,4,5,6],[9,8,7]] for num in x: if 5 in num: print 'yes' break This is Loyds solution: if 5 not in x[0]: print "yes" This was mine: x = [[1,2,3],[2,4,6],[8,4,5,6],[9,8,7]] for num in x: if 5 not in num: print 'yes' What is the advantage to using break as in gustavo's code?