human
get item's position in a list
assistant
Here is some code to get the position of item 1 in `testlist`

for i in (i for (i, x) in enumerate(testlist) if (x == 1)):
    pass

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.