def p5list(num):
    """List pocketfives ranked players, max 100 if no NUM, or NUM if specified."""

    from .website.pocketfives import get_ranked_players

    format_str = '{:>4.4}   {!s:<15.13}{!s:<18.15}{!s:<9.6}{!s:<10.7}'\
                 '{!s:<14.11}{!s:<12.9}{!s:<12.9}{!s:<12.9}{!s:<4.4}'

    click.echo(format_str.format(
        'Rank' , 'Player name', 'Country', 'Triple', 'Monthly', 'Biggest cash',
        'PLB score', 'Biggest s', 'Average s', 'Prev'
    ))
    # just generate the appropriate number of underlines and cut them with format_str
    underlines = ['-' * 20] * 10
    click.echo(format_str.format(*underlines))

    for ind, player in enumerate(get_ranked_players()):
        click.echo(format_str.format(str(ind + 1) + '.', *player))
        if ind == num - 1:
            break
List pocketfives ranked players, max 100 if no NUM, or NUM if specified.