Python3 列表Python3 列表 len()方法本页总览Python3 列表 len()方法描述len() 方法返回列表元素个数。语法len()方法语法:len(list)参数list -- 要计算元素个数的列表。返回值返回列表元素个数。实例以下实例展示了 len()函数的使用方法:#!/usr/bin/python3list1 = ['Google', 'LECTCode', 'Taobao']print (len(list1))list2=list(range(5)) # 创建一个 0-4 的列表print (len(list2))以上实例输出结果如下:35