Hello!
I was trying to display/print elements of a list, suppose a = [1,2,3,4,5], using functions. But the code i wrote prints only the first element of the list whereas i needed all the elements of the list to be printed( as in 1 2 3 4 5 but all in new lines). Is there a possibility that recursive function might do the trick. Kindly help with the code.
>>>
>>> a = [1,2,3,4,5]
>>> def items(list1):
... for items in list1:
... return items
...
>>> print items(a)
1
>>>