my_list = ['a','b','c']
def func(input):
for i in input:
print i
print func(my_list)
Output
a
b
c
None
I don't want the 'None' so how I can do a single line of code to return the items in my input list?
I tried:
return for i in input: print i
but it didn't work because return statements don't work like that