Return items from list in function. Python -
this question has answer here:
my_list = ['a','b','c'] def func(input): in input: print print func(my_list)
output
a b c none
i don't want 'none' how can single line of code return items in input list?
i tried:
return in input: print
but didn't work because return statements don't work that
you printing return code func
none
. call func(my_list)
without print
.
Comments
Post a Comment