Let’s say I have a list [2, 6, 1, 9]. Is it possible to get the position of the number in the list? For example if 6 is the input, the output would be 2 because it"s the second number in the list.
You can make a parallel list and use a conditional statement. The graph Desmos | Graphing Calculator shows an example of how to get the first occurence of a 6 in a list, though it doesn’t quite know what to do if no 6 shows up.
That’s exactly what I needed and I was able to replicate it for my needs. Thank you!
I can’t quite get my head around how that works. Could you explain what is happening?
Don’t worry. I’ve got it.