在Python中,可以使用`len()`函數來返回列表的元素個數。例如:```pythonmy_list = [1, 2, 3, 4, 5]print(len(my_list))```輸出為:```5```