Permalink
Switch branches/tags
Nothing to show
Find file Copy path
65d4da6 May 15, 2015
1 contributor

Users who have contributed to this file

executable file 17 lines (13 sloc) 362 Bytes
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
L = ['Michael', 'Sarah', 'Tracy', 'Bob', 'Jack']
print('L[0:3] =', L[0:3])
print('L[:3] =', L[:3])
print('L[1:3] =', L[1:3])
print('L[-2:] =', L[-2:])
R = list(range(100))
print('R[:10] =', R[:10])
print('R[-10:] =', R[-10:])
print('R[10:20] =', R[10:20])
print('R[:10:2] =', R[:10:2])
print('R[::5] =', R[::5])