1. 使用`len()`函数:
```python
list1 = [1, 2, 3]
list2 = [1, 3, 5]
if len(list1) > len(list2):
print("list1 is larger")
elif len(list1) < len(list2):
print("list2 is larger")
else:
print("lists are equal in size")
2. 使用比较操作符`>`和`<`:
```python
list1 = [1, 2, 3]
list2 = [1, 3, 5]
if list1 > list2:
print("list1 is larger")
elif list1 < list2:
print("list2 is larger")
else:
print("lists are equal")
3. 使用`cmp()`函数(Python 2.x):
```python
list1 = [123, 'xyz']
list2 = [456, 'abc']
print cmp(list1, list2) 输出结果取决于列表元素的比较结果
4. 使用`operator`模块(Python 3.x及以上版本):
```python
import operator
list1 = ['hello']
list2 = ['name']
print(operator.eq(list1, list2)) 输出结果取决于列表元素的比较结果
请注意,在Python 3.x及以上版本中,`cmp()`函数已经被移除,需要使用`operator`模块来进行比较。
以上方法可以帮助你比较列表的大小。