creating list n many times
How to define n many empty lists where n is the number of vertices of the given arbitrary graph.
Thanks in advance.
n is your number of vertices, you can for instance create a list of
n empty lists as follows:
sage: L = [ for _ in range(n)]
And then you can access the (empty) list number
sage: L[i]  sage: L[i].append(0) sage: L[i] 
Asked: 2015-10-12 08:45:30 -0500
Seen: 77 times
Last updated: Oct 12 '15