To get the index of a value in a list
indx = [i for i, v in enumerate(lis) if v == 1]
Created
November 8, 2018 16:29
-
-
Save rohitfarmer/da2aa4f81a77018ec65412aaac384270 to your computer and use it in GitHub Desktop.
Example code in Python
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment