If I do this with print function
def numberList(items):
number = 1
for item in items:
print(number, item)
number = number + 1
numberList(['red', 'orange', 'yellow', 'green'])
I get this
1 red
2 orange
3 yellow
4 green
if I then change the print function to return function I get just only this:
(1, 'red')
why is this so?
I need the return function to work exactly like the print function, what do I need to change on the code or rewrite...thanks...Pls do make your response as simple, understandable and straight forward as possible..cheers