-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 Answers1

0

use len :

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

Note : never use list as a variable name.

Tony Suffolk 66
  • 9,358
  • 3
  • 30
  • 33