from itertools import product, chain
lista = [['julian', '0', '4', '4'], ['ana', '10', '4']]
def get_all_indexes(lista, valor):
return (i for i, v in enumerate(lista) if v == valor)
def search(lista, valor):
return (list(product([indice], get_all_indexes(sublista, valor)))
for indice, sublista in enumerate(lista) if valor in sublista)
print( list(search(lista, '4')) )
ZnJvbSBpdGVydG9vbHMgaW1wb3J0IHByb2R1Y3QsIGNoYWluCgpsaXN0YSA9IFtbJ2p1bGlhbicsICcwJywgJzQnLCAnNCddLCBbJ2FuYScsICcxMCcsICc0J11dCgpkZWYgZ2V0X2FsbF9pbmRleGVzKGxpc3RhLCB2YWxvcik6CiAgICByZXR1cm4gKGkgZm9yIGksIHYgaW4gZW51bWVyYXRlKGxpc3RhKSBpZiB2ID09IHZhbG9yKQogICAgCmRlZiBzZWFyY2gobGlzdGEsIHZhbG9yKToKICAgIHJldHVybiAobGlzdChwcm9kdWN0KFtpbmRpY2VdLCBnZXRfYWxsX2luZGV4ZXMoc3VibGlzdGEsIHZhbG9yKSkpIAogICAgICAgIGZvciBpbmRpY2UsIHN1Ymxpc3RhIGluIGVudW1lcmF0ZShsaXN0YSkgaWYgdmFsb3IgaW4gc3VibGlzdGEpCiAgICAgICAgCnByaW50KCBsaXN0KHNlYXJjaChsaXN0YSwgJzQnKSkgKQ==