-1

For example, list[1, 2, 3] has 3 items (and indexex 0, 1, 2).

How can I print the number of objects in a list? In this istance, it would be "3".

1

1 Answer 1

0

use len :

 >> lst = [0,1,2,3]
 >> len(lst)
 4

Note : never use list as a variable name.

Not the answer you're looking for? Browse other questions tagged or ask your own question.