Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To check the type of l, you can type ?l. You will see that l is a generator, not a list object. Thus in order to compute its length (and do other list-specific operations) you must convert it to a list using list.