elements in a list [newbie]

Chris Gonnerman chris.gonnerman at usa.net
Thu Feb 1 23:54:55 EST 2001


----- Original Message -----
From: "Harvest T. Moon" <h4rv3st.m00n at gmx.net>
Subject: Q: elements in a list [newbie]


> i hope this is not some kind of 'very stupid' question, how can i find out
> how many elements are in a list?
> (generated by file.readlines())

f = file.readlines()
l = len(f)

Thar ya go.






More information about the Python-list mailing list