There's an easy way to loop through all the elements of list by using a for loop.