title: Creating a tuple using a for loop.
body: <p>I'm new to Python, and while I've done some of the refresher on Codecademy, I'm having difficulty with this first task. </p>
  
  <p><strong>"Task 1: Please open the code skeleton file “i772_assg1.py” and implement the function list_ele_idx(li). You must write a “for loop” that reads the elements of a list, and for each element you create a tuple (element,index) to record the element and its index(position) in the list. This function takes a list “li” as its argument. The return value of the function should be a list of (element, index) tuples. In the main method, I have written a test case for task 1. Please un-comment the test case and test your function."</strong></p>
  
  <p>Here's what I'm trying, but I'm not getting anything. Any feedback will be greatly appreciated, as this is my first post on Stack Overflow!</p>
  
  <pre><code>def list_ele_idx(li):
      index = 0 # index
      element = [(5,3,2,6)]
      li = [] # initialze a list; you need to add a tuple that includes an element and its index to this list
      # your code here. You must use for loop to read items in li and add (item,index)tuples to the list lis
      for index in li:
          li.append((element, index))
      return li # return a list of tuples
  </code></pre>