human
I found an interesting problem on https://www.codewars.com/kata/5d7b9ed14cd01b000e7ebb41:
Time to build a crontab parser... https://en.wikipedia.org/wiki/Cron

A crontab command is made up of 5 fields in a space separated string:

```
minute: 0-59
hour: 0-23
day of month: 1-31
month: 1-12
day of week: 0-6 (0 == Sunday)
```

Each field can be a combination of the following values:

* a wildcard `*` which equates to all valid values.
* a range `1-10` which equates to all valid values between start-end inclusive.
* a step `*/2` which equates to every second value starting at 0, or 1 for day of month and month.
* a single value `2` which would be 2.
* a combination of the above separated by a `,`

Note: In the case of multiple values in a single field, the resulting values should be sorted.

Note: Steps and ranges can also be combined `1-10/2` would be every second value in the `1-10` range `1 3 5 7 9`.

For an added challenge day of week and month will both support shortened iso formats:

```
SUN MON TUE ...
JAN FEB MAR ...
```

Examples
========

`*` should output every valid value `0 1 2 3 4 5 6 ...`

`1` should output the value `1`.

`1,20,31` should output the values `1 20 31`.

`1-10` should output the values `1 2 3 4 5 6 7 8 9 10`.

`*/2` should output every second value `0 2 4 6 8 10 ...`.

`*/2` should output `1 3 5 7 9 ...` in the cases, day of month and month.

`1-10/2` should output `1 3 5 7 9`.

`*/15,3-5` should output the values `0 3 4 5 15 30 45` when applied to the minute field.

Output
======

The purpose of this kata is to take in a crontab command, and render it in a nice human readable format.

The output format should be in the format `field_name      values`. The field name should be left justified and
padded to 15 characters. The values should be a space separated string of the returned values.

For example the crontab `*/15 0 1,15 * 1-5` would have the following output:

```
minute          0 15 30 45
hour            0
day of month    1 15
month           1 2 3 4 5 6 7 8 9 10 11 12
day of week     1 2 3 4 5
```

All test cases will receive a valid crontab, there is no need to...

I tried it in Python, but could not do it. Can you solve it?

 What is a the Python program you requested?
assistant
#Here is the Python program you requested.

RANGES = {
    'minute': (0, 59),
    'hour': (0, 23),
    'day of month': (1, 31),
    'month': (1, 12),
    'day of week': (0, 6),
}

ALIASES = {
    'month': ' JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC'.split(' '),
    'day of week': 'SUN MON TUE WED THU FRI SAT'.split(),
}

def get_alias(field, value):
    try:
        return ALIASES[field].index(value)
    except:
        return int(value)

def parse(crontab):
    def parse_field(field, value):
        values = set()
        for part in value.split(','):
            part, *end = part.split('/')
            step = int(end[0]) if end else 1
            if part == '*':
                start, stop = RANGES[field]
            else:
                part, *end = part.split('-')
                start = get_alias(field, part)
                stop = get_alias(field, end[0]) if end else start
            values.update(range(start, stop + 1, step))
        return ' '.join(map(str, sorted(values)))
    return '\n'.join(f'{field:<15}{parse_field(field, value)}'
                     for field, value in zip(RANGES, crontab.split()))