On Jul 11, 2:53 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Alex Bryan wrote: > > I am just wondering how you get an integer value for how many items > > there are in a list, preferably w/o a for loop. > > Read the library reference sections on built-in functions and classes.
Quite simple. If I understand you correctly, you have a list like this: >>> list = ['a', 'b', 'c', 'd'] As you can see, the list has 4 entries. The len() function also says that we have 4 entries. >>> len(list) 4 Now, if we wanted a particular entry, we would do this: >>> list[0] 'a' (Remember, when calling something in a list we count zero.) >>> list[3] 'd' Hope this helped. David -- http://mail.python.org/mailman/listinfo/python-list