title: How to make code that's functionally similar to enumerate without actually using enumerate?
body: <p>I suppose to write a code that prints out the value of a number that occurs twice in the list given, but they don't allow us to use a built in function on python. How would I be able to write it without using enumerate? </p>
  
  <pre><code>def find_second_occurrence(xs,v):
      count = 0
      value = None
      for i, x in enumerate(xs):
          if v == x:
              count += 1
              if count == 2:
                  return i
      if (count &lt; 2):
          return value
  </code></pre>