logo CodeStepByStep logo


Language/Type: Python lists

Write a function named print_list that accepts a list of integers as a parameter and prints them, one per line, in the format shown. Your code should work for a list of any size. For example, if a list named a contains the elements [32, 5, 27, -3, 2598], then the call of print_list(a) should produce the following output:

element [0] is 32
element [1] is 5
element [2] is 27
element [3] is -3
element [4] is 2598
Type your Python solution code here:

This is a function exercise. Write a Python function as described. Do not write a complete program; just the function(s) above.

You must log in before you can solve this problem.

Log In

Need help?

If you do not understand how to solve an exercise or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect tests, etc.), please

Is there a problem? Contact a site administrator.

©, all rights reserved.