fork(1) download
  1. lista = [['julian', '0', '4', '4'], ['ana', '10', '4']]
  2.  
  3. def search(lista, valor):
  4. for i, sublista in enumerate(lista):
  5. yield from ((i, j) for j, item in enumerate(sublista) if item == valor)
  6.  
  7. print( list(search(lista, '4')) )
Success #stdin #stdout 0.04s 9404KB
stdin
Standard input is empty
stdout
[(0, 2), (0, 3), (1, 2)]