In [4]: b = list(range(10))
In [5]: print(b)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
In [6]: b[:5]
Out[6]: [0, 1, 2, 3, 4]
In [7]: c = list(range(3))
In [8]: c
Out[8]: [0, 1, 2]
In [9]: c[:5]
Out[9]: [0, 1, 2]
In [10]: len(c[:5])
Out[10]: 3
In [4]: b = list(range(10))
In [5]: print(b)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
In [6]: b[:5]
Out[6]: [0, 1, 2, 3, 4]
In [7]: c = list(range(3))
In [8]: c
Out[8]: [0, 1, 2]
In [9]: c[:5]
Out[9]: [0, 1, 2]
In [10]: len(c[:5])
Out[10]: 3