data = (
    """0010GEORGE JETSON    12345 SPACESHIP ST   HOUSTON       TX
0020WILE E COYOTE    312 ACME BLVD        TUCSON        AZ
0030FRED FLINTSTONE  246 GRANITE LANE     BEDROCK       CA
0040JONNY QUEST      31416 SCIENCE AVE    PALO ALTO     CA"""
    .splitlines())
fieldslices = [slice(*fielddef) for fielddef in [(0, 4), (4, 21), (21, 42),
    (42, 56), (56, 58)]]
fields = 'id name address city state'.split()
for rec in data:
    for field, sl in zip(fields, fieldslices):
        print(field, ':', rec[sl])
print()
Python slice how-to, I know the Python slice but how can I use built-in slice object for it?