Quotes help make search much faster. Example: "Practice Makes Perfect"

Wednesday, November 28, 2012

Codecademy: Using an arbitrary number of lists in a function


#sample solution

m = [1,2,3]
n = [4,5,6]
o = [7,8,9]
#function goes here
def myFun(*lists):
concatenatedLists = []
for list in lists:
for num in list:
concatenatedLists.append(num)
return concatenatedLists
print myFun(m,n,o)

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts