@acwoss/

VastEarnestBrowser

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.3653731172303607","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"bGlzdGEgPSBbWydqdWxpYW4nLCAnMCcsICc0J10sIFsnYW5hJywgJzEwJywgJzQnXV0KCmRlZiBzZWFyY2ggKGxpc3RhLCB2YWxvcik6CiAgICByZXR1cm4gWyhsaXN0YS5pbmRleCh4KSwgeC5pbmRleCh2YWxvcikpIGZvciB4IGluIGxpc3RhIGlmIHZhbG9yIGluIHhdCgpwcmludChzZWFyY2gobGlzdGEsICJqdWxpYW4iKSkgIyBbKDAsIDApXQpwcmludChzZWFyY2gobGlzdGEsICJhbmEiKSkgICAgIyBbKDEsIDApXQpwcmludChzZWFyY2gobGlzdGEsICIwIikpICAgICAgIyBbKDAsIDEpXQpwcmludChzZWFyY2gobGlzdGEsICI0IikpICAgICAgIyBbKDAsIDIpLCAoMSwgMildCnByaW50KHNlYXJjaChsaXN0YSwgImZvbyIpKSAgICAjIFtd"},"asBuffer":null},"loaded":true}}
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"))    # []