# [Python](https://www.python.org), 39 bytes <pre><code class="lang-python">def f(a,x):print(a.index(x));f(a[1:],x)</code></pre> [Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vwYKlpSVpuhY31VNS0xTSNBJ1KjStCooy80o0EvUy81JSKzQqNDWtgRLRhlaxQEmocqu0_CKFHIXMPIX8gtQ8DQNNKy6FkqJKq2itNA2t1LLEHI0cTc1YLoXUiuTUghKoieq6urrqUBMW3EyPVndU11F3AmJnIHYE41gQwYVDxgmnjDNOGRd1iH0A) Finishes with an exception -5 bytes thanks to AnttiP ## [Whython](https://github.com/pxeger/whython), 46 bytes <pre><code class="lang-python">def f(a,x): while[print(a.index(x))]?0:_,*a=a</code></pre> [Attempt This Online!](https://ato.pxeger.com/run?1=m728PKOyJCM_b8GCpaUlaboWN_VSUtMU0jQSdSo0rbgUyjMyc1KjC4oy80o0EvUy81JSKzQqNDVj7Q2s4nW0Em0Tobo00_KLFHIUMvMU8gtS8zQMNK3SNLRSyxJzNHI0Na0h-tV1dXXVNSEaFtxMj1Z3VNdRdwJiZyB2BONYEMGFQ8YJp4wzThkXdYh9AA) No error