@acwoss/

VastEarnestBrowser

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
lista = [['julian', '0', '4'], ['ana', '10', '4']]

def search (lista, valor):
    return [(lista.index(x), x.index(valor)) for x in lista if valor in x]

print(search(lista, "julian")) # [(0, 0)]
print(search(lista, "ana"))    # [(1, 0)]
print(search(lista, "0"))      # [(0, 1)]
print(search(lista, "4"))      # [(0, 2), (1, 2)]
print(search(lista, "foo"))    # []