Return items from list in function. Python -


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

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -