How to return list of lists

eternaltheft at gmail.com eternaltheft at gmail.com
Thu Apr 25 11:01:09 EDT 2013


Hi guys, I'm having a lot of trouble with this.

My understanding of python is very basic and I was wondering how I can return this table as a list of lists.

1	2	3	4	5
3	4	5	6
5	6	7
7	8
9

The function is 
def Table(n): 
Then how would I make it that when the value of n is 4 it returns [[1, 2, 3], [3, 4], [5]].

Thank you 



More information about the Python-list mailing list