How to create a function in Python that makes objects (i.e lists) -


i couldn't find guide me out in area. hoping me explain kind of programming in python. trying write code goes this:

def runner():     g in range(somerange):         makelistobjectcalled 'listnumber'+'g'         listnumberg.append(g*500000 or whatever)         print listnumberg      #so have somerange amount of lists      #named 0,1,2,3...(up somerange) through 

i think can done classes (in fact i'm guessing thats they're for...) i'm not sure. lay me down clarifications please?

it looks want list of lists.

def runner():     lists = []     g in range(somerange):         lists[g] = []         lists[g].append(g*500000 or whatever)         print lists[g]         #this way, have lists[0], lists[1], ..., lists[somerange] 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -